| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CanvasMetrics_h | 5 #ifndef CanvasMetrics_h |
| 6 #define CanvasMetrics_h | 6 #define CanvasMetrics_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "wtf/Allocator.h" | 9 #include "wtf/Allocator.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 class PLATFORM_EXPORT CanvasMetrics { | 13 class PLATFORM_EXPORT CanvasMetrics { |
| 14 STATIC_ONLY(CanvasMetrics); | 14 STATIC_ONLY(CanvasMetrics); |
| 15 public: | 15 public: |
| 16 enum CanvasContextUsage { | 16 enum CanvasContextUsage { |
| 17 CanvasCreated = 0, | 17 CanvasCreated = 0, |
| 18 GPUAccelerated2DCanvasImageBufferCreated = 1, | 18 GPUAccelerated2DCanvasImageBufferCreated = 1, |
| 19 DisplayList2DCanvasImageBufferCreated = 2, | 19 DisplayList2DCanvasImageBufferCreated = 2, |
| 20 Unaccelerated2DCanvasImageBufferCreated = 3, | 20 Unaccelerated2DCanvasImageBufferCreated = 3, |
| 21 Accelerated2DCanvasGPUContextLost = 4, | 21 Accelerated2DCanvasGPUContextLost = 4, |
| 22 Unaccelerated2DCanvasImageBufferCreationFailed = 5, | 22 Unaccelerated2DCanvasImageBufferCreationFailed = 5, |
| 23 GPUAccelerated2DCanvasImageBufferCreationFailed = 6, | 23 GPUAccelerated2DCanvasImageBufferCreationFailed = 6, |
| 24 DisplayList2DCanvasFallbackToRaster = 7, | 24 DisplayList2DCanvasFallbackToRaster = 7, |
| 25 GPUAccelerated2DCanvasDeferralDisabled = 8, |
| 26 GPUAccelerated2DCanvasSurfaceCreationFailed = 9, |
| 25 NumberOfUsages | 27 NumberOfUsages |
| 26 }; | 28 }; |
| 27 | 29 |
| 28 static void countCanvasContextUsage(const CanvasContextUsage); | 30 static void countCanvasContextUsage(const CanvasContextUsage); |
| 29 }; | 31 }; |
| 30 | 32 |
| 31 } // namespace blink | 33 } // namespace blink |
| 32 | 34 |
| 33 #endif // CanvasMetrics_h | 35 #endif // CanvasMetrics_h |
| OLD | NEW |