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

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

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.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp b/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
index 065aa6c5bd320df31d10ecc244547d596119647b..b774f3502c4fa997416c1565b17118fdf8b0b8df 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
@@ -33,6 +33,7 @@
#include "platform/graphics/gpu/SharedGpuContext.h"
#include "platform/graphics/skia/SkiaUtils.h"
#include "skia/ext/texture_handle.h"
+#include "skia/ext/cdl_canvas.h"
#include "third_party/skia/include/gpu/GrContext.h"
#include "wtf/PtrUtil.h"
#include "wtf/RefPtr.h"
@@ -61,15 +62,16 @@ AcceleratedImageBufferSurface::AcceleratedImageBufferSurface(
Opaque == opacityMode ? nullptr : &disableLCDProps);
if (!m_surface)
return;
+ m_canvas.reset(new CdlPassThroughCanvas(m_surface->getCanvas()));
clear();
// Always save an initial frame, to support resetting the top level matrix
// and clip.
- m_surface->getCanvas()->save();
+ canvas()->save();
}
bool AcceleratedImageBufferSurface::isValid() const {
- return m_surface && SharedGpuContext::isValid() &&
+ return m_canvas && SharedGpuContext::isValid() &&
m_contextId == SharedGpuContext::contextId();
}

Powered by Google App Engine
This is Rietveld 408576698