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