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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h

Issue 2690583002: Make cc/paint have concrete types (Closed)
Patch Set: PaintRecord as typedef, fixup playback calls 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: third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h b/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h
index 7f388670a7de290478dcebe44b219cdd080bb643..ab8d1f6e23eda1858939e4e5485685ea1999820d 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h
+++ b/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h
@@ -53,9 +53,7 @@ class PLATFORM_EXPORT AcceleratedImageBufferSurface
SkColorType = kN32_SkColorType);
~AcceleratedImageBufferSurface() override {}
- PaintCanvas* canvas() override {
- return m_surface ? m_surface->getCanvas() : nullptr;
- }
+ PaintCanvas* canvas() override { return m_canvas.get(); }
bool isValid() const override;
bool isAccelerated() const override { return true; }
sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason) override;
@@ -63,7 +61,8 @@ class PLATFORM_EXPORT AcceleratedImageBufferSurface
private:
unsigned m_contextId;
- sk_sp<PaintSurface> m_surface; // Uses m_contextProvider.
+ sk_sp<SkSurface> m_surface; // Uses m_contextProvider.
+ std::unique_ptr<PaintCanvas> m_canvas;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698