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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 4 years 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 c6df647c51e22349717739a4943bd61633c0792a..b37bf8e960d8fc77191ad61cbe3ba70c0110eb22 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h
+++ b/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h
@@ -35,6 +35,7 @@
#include "public/platform/WebGraphicsContext3DProvider.h"
#include "third_party/skia/include/core/SkRefCnt.h"
#include "third_party/skia/include/core/SkSurface.h"
+#include "skia/ext/cdl_canvas.h"
#include <memory>
namespace blink {
@@ -51,9 +52,7 @@ class PLATFORM_EXPORT AcceleratedImageBufferSurface
SkColorType = kN32_SkColorType);
~AcceleratedImageBufferSurface() override {}
- SkCanvas* canvas() override {
- return m_surface ? m_surface->getCanvas() : nullptr;
- }
+ CdlCanvas* canvas() override { return m_canvas.get(); }
bool isValid() const override;
bool isAccelerated() const override { return true; }
sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason) override;
@@ -62,6 +61,7 @@ class PLATFORM_EXPORT AcceleratedImageBufferSurface
private:
unsigned m_contextId;
sk_sp<SkSurface> m_surface; // Uses m_contextProvider.
+ std::unique_ptr<CdlCanvas> m_canvas;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698