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

Unified Diff: Source/platform/graphics/RecordingImageBufferSurface.h

Issue 907453003: Move overdraw tracking code from GraphicsContext to CanvasRenderingContext2D (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix test copypasta Created 5 years, 10 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/platform/graphics/RecordingImageBufferSurface.h
diff --git a/Source/platform/graphics/RecordingImageBufferSurface.h b/Source/platform/graphics/RecordingImageBufferSurface.h
index 558f3aef94f6877caacacac160a81bfd0b49f8cd..a7500db150270eb59839e6e88ac111cdc160bf10 100644
--- a/Source/platform/graphics/RecordingImageBufferSurface.h
+++ b/Source/platform/graphics/RecordingImageBufferSurface.h
@@ -6,7 +6,6 @@
#define RecordingImageBufferSurface_h
#include "platform/graphics/GraphicsContext.h"
-#include "platform/graphics/GraphicsContextClient.h"
#include "platform/graphics/ImageBufferSurface.h"
#include "public/platform/WebThread.h"
#include "third_party/skia/include/core/SkCanvas.h"
@@ -28,40 +27,39 @@ public:
virtual ~RecordingImageBufferFallbackSurfaceFactory() { }
};
-class PLATFORM_EXPORT RecordingImageBufferSurface : public ImageBufferSurface, public GraphicsContextClient {
+class PLATFORM_EXPORT RecordingImageBufferSurface : public ImageBufferSurface {
WTF_MAKE_NONCOPYABLE(RecordingImageBufferSurface); WTF_MAKE_FAST_ALLOCATED;
public:
RecordingImageBufferSurface(const IntSize&, PassOwnPtr<RecordingImageBufferFallbackSurfaceFactory> fallbackFactory, OpacityMode = NonOpaque);
virtual ~RecordingImageBufferSurface();
// Implementation of ImageBufferSurface interfaces
- virtual SkCanvas* canvas() const override;
- virtual PassRefPtr<SkPicture> getPicture() override;
- virtual void willDrawVideo() override;
- virtual void didDraw() override;
- virtual bool isValid() const override { return true; }
- virtual bool isRecording() const override { return !m_fallbackSurface; }
- virtual void willAccessPixels() override;
- virtual void finalizeFrame(const FloatRect&) override;
- virtual void setImageBuffer(ImageBuffer*) override;
- virtual PassRefPtr<SkImage> newImageSnapshot() const override;
- virtual bool needsClipTracking() const override { return !m_fallbackSurface; }
+ SkCanvas* canvas() const override;
+ PassRefPtr<SkPicture> getPicture() override;
+ void willDrawVideo() override;
+ void didDraw() override;
+ bool isValid() const override { return true; }
+ bool isRecording() const override { return !m_fallbackSurface; }
+ void willAccessPixels() override;
+ void willOverwriteCanvas() override;
+ void finalizeFrame(const FloatRect&) override;
+ void setImageBuffer(ImageBuffer*) override;
+ PassRefPtr<SkImage> newImageSnapshot() const override;
+ bool needsClipTracking() const override { return !m_fallbackSurface; }
void draw(GraphicsContext*, const FloatRect& destRect, const FloatRect& srcRect, SkXfermode::Mode, bool needsCopy) override;
// Passthroughs to fallback surface
- virtual const SkBitmap& bitmap() override;
- virtual bool restore() override;
- virtual WebLayer* layer() const override;
- virtual bool isAccelerated() const override;
- virtual Platform3DObject getBackingTexture() const override;
- virtual bool cachedBitmapEnabled() const override;
- virtual const SkBitmap& cachedBitmap() const override;
- virtual void invalidateCachedBitmap() override;
- virtual void updateCachedBitmapIfNeeded() override;
- virtual void setIsHidden(bool) override;
+ const SkBitmap& bitmap() override;
+ bool restore() override;
+ WebLayer* layer() const override;
+ bool isAccelerated() const override;
+ Platform3DObject getBackingTexture() const override;
+ bool cachedBitmapEnabled() const override;
+ const SkBitmap& cachedBitmap() const override;
+ void invalidateCachedBitmap() override;
+ void updateCachedBitmapIfNeeded() override;
+ void setIsHidden(bool) override;
- // Implementation of GraphicsContextClient
- virtual void willOverwriteCanvas() override;
private:
friend class ::RecordingImageBufferSurfaceTest; // for unit testing
void fallBackToRasterCanvas();
« no previous file with comments | « Source/platform/graphics/ImageBufferSurface.h ('k') | Source/platform/graphics/RecordingImageBufferSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698