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

Unified Diff: cc/paint/skia_paint_canvas.h

Issue 2764633002: cc/paint: Remove cc::PaintSurface. (Closed)
Patch Set: more stuff Created 3 years, 9 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/paint/skia_paint_canvas.h
diff --git a/cc/paint/skia_paint_canvas.h b/cc/paint/skia_paint_canvas.h
index 963fc01a706744cee6c9c91af0ea87123626c274..bd40c6b4c1005e0efbcba1c5f0b3be5c97a2324f 100644
--- a/cc/paint/skia_paint_canvas.h
+++ b/cc/paint/skia_paint_canvas.h
@@ -25,6 +25,11 @@ class PaintFlags;
// and then playing back to an SkCanvas.
class CC_PAINT_EXPORT SkiaPaintCanvas final : public PaintCanvas {
public:
+ // Creates a raster canvas with the memory for the pixels automatically
+ // allocated and zero-initialized. Returns null on failure.
+ static std::unique_ptr<SkiaPaintCanvas> CreateRasterZeroed(
+ const SkImageInfo& info);
+
explicit SkiaPaintCanvas(SkCanvas* canvas);
explicit SkiaPaintCanvas(const SkBitmap& bitmap);
explicit SkiaPaintCanvas(const SkBitmap& bitmap, const SkSurfaceProps& props);

Powered by Google App Engine
This is Rietveld 408576698