Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/ExpensiveCanvasHeuristicParameters.h

Issue 2687073003: Make disabling 2d canvas GPU acceleration for getImageData less aggressive. (Closed)
Patch Set: Add test Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // monopolize the texture cache, and when it is being downsized to the 71 // monopolize the texture cache, and when it is being downsized to the
72 // point that few of the upload texels are actually sampled. When both 72 // point that few of the upload texels are actually sampled. When both
73 // of these conditions are met, we disable acceleration. 73 // of these conditions are met, we disable acceleration.
74 DrawImageTextureUploadSoftSizeLimit = 4096 * 4096, 74 DrawImageTextureUploadSoftSizeLimit = 4096 * 4096,
75 DrawImageTextureUploadSoftSizeLimitScaleThreshold = 4, 75 DrawImageTextureUploadSoftSizeLimitScaleThreshold = 4,
76 DrawImageTextureUploadHardSizeLimit = 8192 * 8192, 76 DrawImageTextureUploadHardSizeLimit = 8192 * 8192,
77 77
78 // GPU readback prevention heuristics 78 // GPU readback prevention heuristics
79 //==================================== 79 //====================================
80 80
81 GetImageDataForcesNoAcceleration = 1, 81 GPUReadbackMinSuccessiveFrames = 3,
Justin Novosad 2017/02/16 15:27:20 This parameter is non-trivial to understand, pleas
xiangze.zhang 2017/02/17 02:13:45 Done.
82
83 GPUReadbackForcesNoAcceleration = 1,
82 84
83 // When a canvas is used as a source image, if its destination is 85 // When a canvas is used as a source image, if its destination is
84 // non-accelerated and the source canvas is accelerated, a readback 86 // non-accelerated and the source canvas is accelerated, a readback
85 // from the gpu is necessary. This option causes the source canvas to 87 // from the gpu is necessary. This option causes the source canvas to
86 // switch to non-accelerated when this situation is encountered to 88 // switch to non-accelerated when this situation is encountered to
87 // prevent future canvas-to-canvas draws from requiring a readback. 89 // prevent future canvas-to-canvas draws from requiring a readback.
88 DisableAccelerationToAvoidReadbacks = 0, 90 DisableAccelerationToAvoidReadbacks = 0,
89 91
90 // See description of DisableAccelerationToAvoidReadbacks. This is the 92 // See description of DisableAccelerationToAvoidReadbacks. This is the
91 // opposite strategy : accelerate the destination canvas. If both 93 // opposite strategy : accelerate the destination canvas. If both
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // before the rendering pipeline may be switched. Having this set 204 // before the rendering pipeline may be switched. Having this set
203 // to more than 1 increases the sample size of usage data before a 205 // to more than 1 increases the sample size of usage data before a
204 // decision is made, improving the accuracy of heuristics. 206 // decision is made, improving the accuracy of heuristics.
205 const int MinFramesBeforeSwitch = 3; 207 const int MinFramesBeforeSwitch = 3;
206 208
207 } // namespace ExpensiveCanvasHeuristicParameters 209 } // namespace ExpensiveCanvasHeuristicParameters
208 210
209 } // namespace blink 211 } // namespace blink
210 212
211 #endif 213 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698