Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
index e5c53023e278cb7e184deca631af9ea78433224e..01c7f3d58d609a6498a053f5caf3d758d91551db 100644 |
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp |
@@ -766,8 +766,7 @@ bool HTMLCanvasElement::shouldAccelerate(const IntSize& size) const |
if (RuntimeEnabledFeatures::forceDisplayList2dCanvasEnabled()) |
return false; |
- Settings* settings = document().settings(); |
- if (!settings || !settings->accelerated2dCanvasEnabled()) |
+ if (!RuntimeEnabledFeatures::accelerated2dCanvasEnabled()) |
return false; |
int canvasPixelCount = size.width() * size.height(); |
@@ -788,7 +787,8 @@ bool HTMLCanvasElement::shouldAccelerate(const IntSize& size) const |
} |
// Do not use acceleration for small canvas. |
- if (canvasPixelCount < settings->minimumAccelerated2dCanvasSize()) |
+ Settings* settings = document().settings(); |
+ if (!settings || canvasPixelCount < settings->minimumAccelerated2dCanvasSize()) |
return false; |
if (!Platform::current()->canAccelerate2dCanvas()) |