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

Unified Diff: Source/core/platform/graphics/ImageBuffer.h

Issue 19705006: Use SkImage as a backing store for copying 2d Contexts to ImageBitmaps. Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Change SkImage to use srcRect pointer. Created 7 years, 5 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
Index: Source/core/platform/graphics/ImageBuffer.h
diff --git a/Source/core/platform/graphics/ImageBuffer.h b/Source/core/platform/graphics/ImageBuffer.h
index fd96acf2fb82051d6082a9b84370ac41c21657f8..09380ad792cb2612f6fcd971bcb3c28c99cadd97 100644
--- a/Source/core/platform/graphics/ImageBuffer.h
+++ b/Source/core/platform/graphics/ImageBuffer.h
@@ -43,6 +43,7 @@
#include "wtf/Vector.h"
class SkCanvas;
+class SkSurface;
namespace WebKit { class WebLayer; }
@@ -104,6 +105,7 @@ public:
GraphicsContext* context() const;
+ PassRefPtr<Image> imageSnapshot() const;
PassRefPtr<Image> copyImage(BackingStoreCopy = CopyBackingStore, ScaleBehavior = Scaled) const;
// Give hints on the faster copyImage Mode, return DontCopyBackingStore if it supports the DontCopyBackingStore behavior
// or return CopyBackingStore if it doesn't.
@@ -133,6 +135,9 @@ public:
void reportMemoryUsage(MemoryObjectInfo*) const;
private:
+ SkCanvas* createAcceleratedCanvas(const IntSize&, OwnPtr<Canvas2DLayerBridge>*, OpacityMode);
+ SkCanvas* createNonPlatformCanvas(const IntSize&);
+
void draw(GraphicsContext*, const FloatRect&, const FloatRect& = FloatRect(0, 0, -1, -1), CompositeOperator = CompositeSourceOver, BlendMode = BlendModeNormal, bool useLowQualityScale = false);
void drawPattern(GraphicsContext*, const FloatRect&, const FloatSize&, const FloatPoint&, CompositeOperator, const FloatRect&);
@@ -145,6 +150,7 @@ private:
IntSize m_logicalSize;
float m_resolutionScale;
OwnPtr<SkCanvas> m_canvas;
+ RefPtr<SkSurface> m_surface;
Justin Novosad 2013/07/22 15:35:41 Make this an OwnPtr instead.
OwnPtr<GraphicsContext> m_context;
OwnPtr<Canvas2DLayerBridge> m_layerBridge;

Powered by Google App Engine
This is Rietveld 408576698