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 |