| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkPictureAnalyzer_DEFINED | 8 #ifndef SkPictureAnalyzer_DEFINED |
| 9 #define SkPictureAnalyzer_DEFINED | 9 #define SkPictureAnalyzer_DEFINED |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 /** | 41 /** |
| 42 * Reset all accumulated stats. | 42 * Reset all accumulated stats. |
| 43 */ | 43 */ |
| 44 void reset(); | 44 void reset(); |
| 45 | 45 |
| 46 /** | 46 /** |
| 47 * Returns true if the analyzed pictures are suitable for rendering on the
GPU. | 47 * Returns true if the analyzed pictures are suitable for rendering on the
GPU. |
| 48 */ | 48 */ |
| 49 bool suitableForGpuRasterization(const char** whyNot = nullptr) const; | 49 bool suitableForGpuRasterization(const char** whyNot = nullptr) const; |
| 50 | 50 |
| 51 /** |
| 52 * Returns the number of commands which are slow to draw on the GPU, capped
at the predicate |
| 53 * max. |
| 54 */ |
| 55 uint32_t numSlowGpuCommands() { return fNumSlowPaths; } |
| 56 |
| 51 private: | 57 private: |
| 52 uint32_t fNumSlowPaths; | 58 uint32_t fNumSlowPaths; |
| 53 | 59 |
| 54 typedef SkNoncopyable INHERITED; | 60 typedef SkNoncopyable INHERITED; |
| 55 }; | 61 }; |
| 56 | 62 |
| 57 #endif // SK_SUPPORT_GPU | 63 #endif // SK_SUPPORT_GPU |
| 58 | 64 |
| 59 #endif // SkPictureAnalyzer_DEFINED | 65 #endif // SkPictureAnalyzer_DEFINED |
| OLD | NEW |