OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" | 33 #include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" |
34 #include "platform/Histogram.h" | 34 #include "platform/Histogram.h" |
35 #include "platform/RuntimeEnabledFeatures.h" | 35 #include "platform/RuntimeEnabledFeatures.h" |
36 #include "platform/WebTaskRunner.h" | 36 #include "platform/WebTaskRunner.h" |
37 #include "platform/graphics/CanvasMetrics.h" | 37 #include "platform/graphics/CanvasMetrics.h" |
38 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" | 38 #include "platform/graphics/ExpensiveCanvasHeuristicParameters.h" |
39 #include "platform/graphics/GraphicsLayer.h" | 39 #include "platform/graphics/GraphicsLayer.h" |
40 #include "platform/graphics/ImageBuffer.h" | 40 #include "platform/graphics/ImageBuffer.h" |
41 #include "platform/graphics/gpu/SharedContextRateLimiter.h" | 41 #include "platform/graphics/gpu/SharedContextRateLimiter.h" |
42 #include "platform/graphics/paint/PaintCanvas.h" | 42 #include "platform/graphics/paint/PaintCanvas.h" |
43 #include "platform/graphics/paint/PaintSurface.h" | |
44 #include "platform/instrumentation/tracing/TraceEvent.h" | 43 #include "platform/instrumentation/tracing/TraceEvent.h" |
45 #include "public/platform/Platform.h" | 44 #include "public/platform/Platform.h" |
46 #include "public/platform/WebCompositorSupport.h" | 45 #include "public/platform/WebCompositorSupport.h" |
47 #include "public/platform/WebGraphicsContext3DProvider.h" | 46 #include "public/platform/WebGraphicsContext3DProvider.h" |
48 #include "public/platform/WebScheduler.h" | 47 #include "public/platform/WebScheduler.h" |
49 #include "public/platform/WebTraceLocation.h" | 48 #include "public/platform/WebTraceLocation.h" |
50 #include "skia/ext/texture_handle.h" | 49 #include "skia/ext/texture_handle.h" |
51 #include "third_party/skia/include/core/SkData.h" | 50 #include "third_party/skia/include/core/SkData.h" |
| 51 #include "third_party/skia/include/core/SkSurface.h" |
52 #include "third_party/skia/include/gpu/GrContext.h" | 52 #include "third_party/skia/include/gpu/GrContext.h" |
53 #include "third_party/skia/include/gpu/GrTexture.h" | 53 #include "third_party/skia/include/gpu/GrTexture.h" |
54 #include "third_party/skia/include/gpu/gl/GrGLTypes.h" | 54 #include "third_party/skia/include/gpu/gl/GrGLTypes.h" |
55 #include "wtf/PtrUtil.h" | 55 #include "wtf/PtrUtil.h" |
56 | 56 |
57 namespace { | 57 namespace { |
58 enum { | 58 enum { |
59 InvalidMailboxIndex = -1, | 59 InvalidMailboxIndex = -1, |
60 MaxCanvasAnimationBacklog = 2, // Make sure the the GPU is never more than | 60 MaxCanvasAnimationBacklog = 2, // Make sure the the GPU is never more than |
61 // two animation frames behind. | 61 // two animation frames behind. |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 default; | 1116 default; |
1117 | 1117 |
1118 void Canvas2DLayerBridge::Logger::reportHibernationEvent( | 1118 void Canvas2DLayerBridge::Logger::reportHibernationEvent( |
1119 HibernationEvent event) { | 1119 HibernationEvent event) { |
1120 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, | 1120 DEFINE_STATIC_LOCAL(EnumerationHistogram, hibernationHistogram, |
1121 ("Canvas.HibernationEvents", HibernationEventCount)); | 1121 ("Canvas.HibernationEvents", HibernationEventCount)); |
1122 hibernationHistogram.count(event); | 1122 hibernationHistogram.count(event); |
1123 } | 1123 } |
1124 | 1124 |
1125 } // namespace blink | 1125 } // namespace blink |
OLD | NEW |