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

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

Issue 104023007: Refactoring ImageBuffer to decouple it from Canvas2DLayerBridge (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase mayhem Created 7 years 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 | « Source/core/frame/ImageBitmap.cpp ('k') | Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLCanvasElement.h
diff --git a/Source/core/html/HTMLCanvasElement.h b/Source/core/html/HTMLCanvasElement.h
index dc1ddaf554c96530641ece704f114944f115a3ab..fa7ad1e8e8e6f016872a5483695b3220ad395423 100644
--- a/Source/core/html/HTMLCanvasElement.h
+++ b/Source/core/html/HTMLCanvasElement.h
@@ -45,6 +45,7 @@ class HTMLCanvasElement;
class Image;
class ImageData;
class ImageBuffer;
+class ImageBufferSurface;
class IntSize;
class CanvasObserver {
@@ -77,7 +78,7 @@ public:
void setSize(const IntSize& newSize)
{
- if (newSize == size() && m_deviceScaleFactor == 1)
+ if (newSize == size())
return;
m_ignoreReset = true;
setWidth(newSize.width());
@@ -122,8 +123,6 @@ public:
bool shouldAccelerate(const IntSize&) const;
- float deviceScaleFactor() const { return m_deviceScaleFactor; }
-
InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
private:
@@ -135,11 +134,11 @@ private:
void reset();
+ PassOwnPtr<ImageBufferSurface> createImageBufferSurface(const IntSize& deviceSize, int* msaaSampleCount);
void createImageBuffer();
void clearImageBuffer();
void setSurfaceSize(const IntSize&);
- IntSize convertLogicalToDevice(const IntSize&) const;
bool paintsIntoCanvasBuffer() const;
@@ -159,7 +158,6 @@ private:
intptr_t m_externallyAllocatedMemory;
- float m_deviceScaleFactor; // FIXME: This is always 1 and should probable be deleted
bool m_originClean;
// It prevents HTMLCanvasElement::buffer() from continuously re-attempting to allocate an imageBuffer
« no previous file with comments | « Source/core/frame/ImageBitmap.cpp ('k') | Source/core/html/HTMLCanvasElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698