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

Unified Diff: cc/resources/raster_buffer.h

Issue 454843002: cc: Do bitmap conversion for RasterBuffer in the worker thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code refactoring. Created 6 years, 4 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: cc/resources/raster_buffer.h
diff --git a/cc/resources/raster_buffer.h b/cc/resources/raster_buffer.h
index f1a04ca2a367ae5fb0fbbfbfd260c571211c60ab..c80f6e793772c95212ca06d3ba2d04fac73a0689 100644
--- a/cc/resources/raster_buffer.h
+++ b/cc/resources/raster_buffer.h
@@ -5,14 +5,17 @@
#ifndef CC_RESOURCES_RASTER_BUFFER_H_
#define CC_RESOURCES_RASTER_BUFFER_H_
+#include "skia/ext/refptr.h"
+
class SkCanvas;
namespace cc {
class RasterBuffer {
public:
- virtual SkCanvas* AcquireSkCanvas() = 0;
- virtual void ReleaseSkCanvas() = 0;
+ virtual skia::RefPtr<SkCanvas> AcquireSkCanvas() = 0;
reveman 2014/08/13 19:19:49 Do we need to return a skia::RefPtr? It's weird th
auygun 2014/08/14 10:35:42 Isn't it better to pass around the skia::RefPtr in
reveman 2014/08/14 12:26:36 Use skia::RefPtr if you need to pass ownership. Ra
auygun 2014/08/15 09:20:40 Acknowledged.
+ // Returns true if canvas was written to while acquired.
+ virtual bool ReleaseSkCanvas(SkCanvas* canvas) = 0;
protected:
virtual ~RasterBuffer() {}

Powered by Google App Engine
This is Rietveld 408576698