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

Unified Diff: Source/platform/graphics/Canvas2DLayerBridge.cpp

Issue 1173973003: getTopDevice is deprecated (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/platform/graphics/ImageBufferSurface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/Canvas2DLayerBridge.cpp
diff --git a/Source/platform/graphics/Canvas2DLayerBridge.cpp b/Source/platform/graphics/Canvas2DLayerBridge.cpp
index 5f69ce1ae65fd30757fd11a10d477fabbf969210..a44254c41b5313410576d54207fc2ae432a9f873 100644
--- a/Source/platform/graphics/Canvas2DLayerBridge.cpp
+++ b/Source/platform/graphics/Canvas2DLayerBridge.cpp
@@ -330,7 +330,8 @@ bool Canvas2DLayerBridge::restoreSurface()
sharedContext = m_contextProvider->context3d();
if (sharedContext && !sharedContext->isContextLost()) {
- IntSize size(m_canvas->getTopDevice()->width(), m_canvas->getTopDevice()->height());
+ SkISize skSize = m_canvas->getBaseLayerSize();
+ IntSize size(skSize.width(), skSize.height());
RefPtr<SkSurface> surface(createSkSurface(m_contextProvider->grContext(), size, m_msaaSampleCount, m_opacityMode));
if (surface.get()) {
m_surface = surface.release();
@@ -519,7 +520,7 @@ Platform3DObject Canvas2DLayerBridge::getBackingTexture()
return 0;
m_canvas->flush();
context()->flush();
- GrRenderTarget* renderTarget = m_canvas->getTopDevice()->accessRenderTarget();
+ GrRenderTarget* renderTarget = m_canvas->getDevice()->accessRenderTarget();
f(malita) 2015/06/10 22:14:21 Are these really interchangeable? IIUC getDevice(
Justin Novosad 2015/06/12 16:11:48 2D canvas never uses saveLayer, So I think this is
if (renderTarget) {
return renderTarget->asTexture()->getTextureHandle();
}
« no previous file with comments | « no previous file | Source/platform/graphics/ImageBufferSurface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698