rsDebugHelper.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (C) 2013 The Android Open Source Project
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef ANDROID_RS_DEBUG_HELPER_H
  17. #define ANDROID_RS_DEBUG_HELPER_H
  18. #include "rsUtils.h"
  19. #include "rsInternalDefines.h"
  20. #if !defined(RS_VENDOR_LIB) && !defined(RS_COMPATIBILITY_LIB)
  21. #include <utils/CallStack.h>
  22. #endif
  23. namespace android {
  24. namespace renderscript {
  25. class DebugHelper {
  26. public:
  27. DebugHelper() {
  28. #if !defined(RS_VENDOR_LIB) && !defined(RS_COMPATIBILITY_LIB)
  29. mStack.update(2);
  30. #endif
  31. }
  32. void dump() {
  33. #if !defined(RS_VENDOR_LIB) && !defined(RS_COMPATIBILITY_LIB)
  34. ALOGV("%s", mStack.toString().string());
  35. //mStack.dump();
  36. #endif
  37. }
  38. private:
  39. #if !defined(RS_VENDOR_LIB) && !defined(RS_COMPATIBILITY_LIB)
  40. CallStack mStack;
  41. #endif
  42. };
  43. } // namespace renderscript
  44. } // namespace android
  45. #endif //ANDROID_RS_DEBUG_HELPER_H