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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.h

Issue 2625873005: Add an heuristic for promoting canvases to GPU acceleration (Closed)
Patch Set: webgl test fix Created 3 years, 11 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/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.h
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
index 39f97d889609fbc6c94d633f823b8e32d7c40914..8da0bccee1311f2fe9316abf2b3273fec6e738d7 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
@@ -238,6 +238,8 @@ class CORE_EXPORT HTMLCanvasElement final
void detachContext() { m_context = nullptr; }
+ void willDrawImageTo2DContext(CanvasImageSource*);
+
protected:
void didMoveToNewDocument(Document& oldDocument) override;
@@ -250,7 +252,11 @@ class CORE_EXPORT HTMLCanvasElement final
static ContextFactoryVector& renderingContextFactories();
static CanvasRenderingContextFactory* getRenderingContextFactory(int);
- bool shouldAccelerate(const IntSize&) const;
+ enum AccelerationCriteria {
+ NormalAccelerationCriteria,
+ IgnoreCanvasSizeAccelerationCriteria,
+ };
+ bool shouldAccelerate(AccelerationCriteria) const;
void parseAttribute(const AttributeModificationParams&) override;
LayoutObject* createLayoutObject(const ComputedStyle&) override;
@@ -259,19 +265,16 @@ class CORE_EXPORT HTMLCanvasElement final
void reset();
std::unique_ptr<ImageBufferSurface> createWebGLImageBufferSurface(
- const IntSize& deviceSize,
OpacityMode);
std::unique_ptr<ImageBufferSurface> createAcceleratedImageBufferSurface(
- const IntSize& deviceSize,
OpacityMode,
int* msaaSampleCount);
std::unique_ptr<ImageBufferSurface> createUnacceleratedImageBufferSurface(
- const IntSize& deviceSize,
OpacityMode);
void createImageBuffer();
void createImageBufferInternal(
std::unique_ptr<ImageBufferSurface> externalSurface);
- bool shouldUseDisplayList(const IntSize& deviceSize);
+ bool shouldUseDisplayList();
void setSurfaceSize(const IntSize&);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698