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

Unified Diff: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h

Issue 2210123002: Improved heuristic for disable acceleration. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable trackDrawCall when Canvas 2D Dynamic Rendering Mode Switching is disabled Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
diff --git a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
index 9638d7ea2b03458bd71b323d627c9d1827e58574..10ce134c780a911270b99f72ff396902fbdb271a 100644
--- a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
+++ b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.h
@@ -13,6 +13,7 @@
#include "modules/canvas2d/CanvasPathMethods.h"
#include "modules/canvas2d/CanvasRenderingContext2DState.h"
#include "modules/canvas2d/CanvasStyle.h"
+#include "platform/graphics/ExpensiveCanvasHeuristicParameters.h"
#include "third_party/skia/include/core/SkCanvas.h"
namespace blink {
@@ -165,7 +166,8 @@ public:
enum DrawCallType {
StrokePath = 0,
FillPath,
- DrawImage,
+ DrawVectorImage,
+ DrawBitmapImage,
FillText,
StrokeText,
FillRect,
@@ -183,21 +185,23 @@ public:
struct UsageCounters {
int numDrawCalls[DrawCallTypeCount]; // use DrawCallType enum as index
- double boundingBoxPerimeterDrawCalls[DrawCallTypeCount];
- double boundingBoxAreaDrawCalls[DrawCallTypeCount];
- double boundingBoxAreaFillType[PathFillTypeCount];
+ float boundingBoxPerimeterDrawCalls[DrawCallTypeCount];
+ float boundingBoxAreaDrawCalls[DrawCallTypeCount];
+ float boundingBoxAreaFillType[PathFillTypeCount];
int numNonConvexFillPathCalls;
- int numGradients;
+ float nonConvexFillPathArea;
+ int numRadialGradients;
+ int numLinearGradients;
int numPatterns;
int numDrawWithComplexClips;
int numBlurredShadows;
- double boundingBoxAreaTimesShadowBlurSquared;
- double boundingBoxPerimeterTimesShadowBlurSquared;
+ float boundingBoxAreaTimesShadowBlurSquared;
+ float boundingBoxPerimeterTimesShadowBlurSquared;
int numFilters;
int numGetImageDataCalls;
- double areaGetImageDataCalls;
+ float areaGetImageDataCalls;
int numPutImageDataCalls;
- double areaPutImageDataCalls;
+ float areaPutImageDataCalls;
int numClearRectCalls;
int numDrawFocusCalls;
int numFramesSinceReset;
@@ -235,6 +239,8 @@ protected:
mutable UsageCounters m_usageCounters;
+
+ float estimateRenderingCost(ExpensiveCanvasHeuristicParameters::RenderingModeCostIndex) const;
private:
void realizeSaves();
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698