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 ExpensiveCanvasHeuristicParameters_h | 5 #ifndef ExpensiveCanvasHeuristicParameters_h |
6 #define ExpensiveCanvasHeuristicParameters_h | 6 #define ExpensiveCanvasHeuristicParameters_h |
7 | 7 |
8 namespace blink { | 8 namespace blink { |
9 | 9 |
10 namespace ExpensiveCanvasHeuristicParameters { | 10 namespace ExpensiveCanvasHeuristicParameters { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // prevent future canvas-to-canvas draws from requiring a readback. | 91 // prevent future canvas-to-canvas draws from requiring a readback. |
92 DisableAccelerationToAvoidReadbacks = 0, | 92 DisableAccelerationToAvoidReadbacks = 0, |
93 | 93 |
94 // See description of DisableAccelerationToAvoidReadbacks. This is the | 94 // See description of DisableAccelerationToAvoidReadbacks. This is the |
95 // opposite strategy : accelerate the destination canvas. If both | 95 // opposite strategy : accelerate the destination canvas. If both |
96 // EnableAccelerationToAvoidReadbacks and | 96 // EnableAccelerationToAvoidReadbacks and |
97 // DisableAccelerationToAvoidReadbacks are specified, we try to enable | 97 // DisableAccelerationToAvoidReadbacks are specified, we try to enable |
98 // acceleration on the destination first. If that does not succeed, | 98 // acceleration on the destination first. If that does not succeed, |
99 // we disable acceleration on the source canvas. Either way, future | 99 // we disable acceleration on the source canvas. Either way, future |
100 // readbacks are prevented. | 100 // readbacks are prevented. |
101 EnableAccelerationToAvoidReadbacks = 1, | 101 EnableAccelerationToAvoidReadbacks = 0, |
102 | 102 |
103 }; // enum | 103 }; // enum |
104 | 104 |
105 // Constants and Coefficients for 2D Canvas Dynamic Rendering Mode Switching | 105 // Constants and Coefficients for 2D Canvas Dynamic Rendering Mode Switching |
106 // ========================================================================= | 106 // ========================================================================= |
107 | 107 |
108 // Approximate relative costs of different types of operations for the | 108 // Approximate relative costs of different types of operations for the |
109 // accelerated rendering pipeline and the recording rendering pipeline. | 109 // accelerated rendering pipeline and the recording rendering pipeline. |
110 // These costs were estimated experimentally using the tools located in the | 110 // These costs were estimated experimentally using the tools located in the |
111 // third_party/WebKit/Source/modules/canvas2d/performance_analysis directory. | 111 // third_party/WebKit/Source/modules/canvas2d/performance_analysis directory. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 // before the rendering pipeline may be switched. Having this set | 206 // before the rendering pipeline may be switched. Having this set |
207 // to more than 1 increases the sample size of usage data before a | 207 // to more than 1 increases the sample size of usage data before a |
208 // decision is made, improving the accuracy of heuristics. | 208 // decision is made, improving the accuracy of heuristics. |
209 const int MinFramesBeforeSwitch = 3; | 209 const int MinFramesBeforeSwitch = 3; |
210 | 210 |
211 } // namespace ExpensiveCanvasHeuristicParameters | 211 } // namespace ExpensiveCanvasHeuristicParameters |
212 | 212 |
213 } // namespace blink | 213 } // namespace blink |
214 | 214 |
215 #endif | 215 #endif |
OLD | NEW |