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

Unified Diff: example/SkiaSDLExample.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 | « debugger/QT/SkGLWidget.cpp ('k') | experimental/SkV8Example/SkV8Example.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: example/SkiaSDLExample.cpp
diff --git a/example/SkiaSDLExample.cpp b/example/SkiaSDLExample.cpp
index 0cc3402d715d3c6a61f1d03364a969c1ddfda5ac..da5f2dc9c11b42994b737e40eb9bcb18f5004015 100644
--- a/example/SkiaSDLExample.cpp
+++ b/example/SkiaSDLExample.cpp
@@ -206,15 +206,14 @@ int main(int argc, char** argv) {
GrGLint buffer;
GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer);
desc.fRenderTargetHandle = buffer;
- SkAutoTUnref<GrRenderTarget>
- renderTarget(grContext->textureProvider()->wrapBackendRenderTarget(desc));
// setup SkSurface
// To use distance field text, use commented out SkSurfaceProps instead
// SkSurfaceProps props(SkSurfaceProps::kUseDeviceIndependentFonts_Flag,
// SkSurfaceProps::kLegacyFontHost_InitType);
SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType);
- SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTargetDirect(renderTarget, &props));
+
+ sk_sp<SkSurface> surface(SkSurface::MakeFromBackendRenderTarget(grContext, desc, &props));
SkCanvas* canvas = surface->getCanvas();
« no previous file with comments | « debugger/QT/SkGLWidget.cpp ('k') | experimental/SkV8Example/SkV8Example.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698