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

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

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

Powered by Google App Engine
This is Rietveld 408576698