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

Unified Diff: experimental/SkV8Example/SkV8Example.cpp

Issue 2198433003: Remove some ancillary users of SkSurface::MakeRenderTargetDirect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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 | « example/SkiaSDLExample.cpp ('k') | include/core/SkSurface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/SkV8Example/SkV8Example.cpp
diff --git a/experimental/SkV8Example/SkV8Example.cpp b/experimental/SkV8Example/SkV8Example.cpp
index bb448bad15174d5aa8bffdf3377c760219ad707e..3882c3e9b320a8652c39c738e432f12ea30dcf97 100644
--- a/experimental/SkV8Example/SkV8Example.cpp
+++ b/experimental/SkV8Example/SkV8Example.cpp
@@ -48,7 +48,6 @@ SkV8ExampleWindow::SkV8ExampleWindow(void* hwnd, JsContext* context)
#if SK_SUPPORT_GPU
, fCurContext(NULL)
, fCurIntf(NULL)
- , fCurRenderTarget(NULL)
, fCurSurface(NULL)
#endif
{
@@ -64,7 +63,6 @@ SkV8ExampleWindow::~SkV8ExampleWindow() {
#if SK_SUPPORT_GPU
SkSafeUnref(fCurContext);
SkSafeUnref(fCurIntf);
- SkSafeUnref(fCurRenderTarget);
SkSafeUnref(fCurSurface);
#endif
}
@@ -99,10 +97,9 @@ void SkV8ExampleWindow::windowSizeChanged() {
GR_GL_GetIntegerv(fCurIntf, GR_GL_FRAMEBUFFER_BINDING, &buffer);
desc.fRenderTargetHandle = buffer;
- SkSafeUnref(fCurRenderTarget);
- fCurRenderTarget = fCurContext->wrapBackendRenderTarget(desc);
SkSafeUnref(fCurSurface);
- fCurSurface = SkSurface::NewRenderTargetDirect(fCurRenderTarget);
+ fCurSurface = SkSurface::MakeFromBackendRenderTarget(fCurContext, desc,
+ nullptr, nullptr).release();
}
}
#endif
« no previous file with comments | « example/SkiaSDLExample.cpp ('k') | include/core/SkSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698