aboutsummaryrefslogtreecommitdiffhomepage
path: root/example
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2017-07-11 12:03:01 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-11 16:34:21 +0000
commit4c70c75d0ab6b2924204c6d70e03c6672c4934a4 (patch)
treec3b02d2c11ecaff90fdde9b9d75169d8c0c5d510 /example
parent39ef556d7c6ea15f0c6afd7707d338cdfd41084a (diff)
Update SkiaSDLExample to latest Ganesh interfaces.
Also updates SDL to 2.0.5. Change-Id: I3a3c8f69360fc20a3d543c19dcf82dd3f42f1309 Reviewed-on: https://skia-review.googlesource.com/22204 Reviewed-by: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'example')
-rw-r--r--example/SkiaSDLExample.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/example/SkiaSDLExample.cpp b/example/SkiaSDLExample.cpp
index f3be85045e..813485f8a3 100644
--- a/example/SkiaSDLExample.cpp
+++ b/example/SkiaSDLExample.cpp
@@ -193,12 +193,12 @@ int main(int argc, char** argv) {
// Wrap the frame buffer object attached to the screen in a Skia render target so Skia can
// render to it
- GrGLFrameBufferInfo fbInfo;
GrGLint buffer;
- GR_GL_GetIntegerv(interface, GR_GL_FRAMEBUFFER_BINDING, &buffer);
- fbInfo.fFBOID = buffer;
- GrBackendRenderTarget backendRT(dm.w, dm.h, kMsaaSampleCount, kStencilBits,
- kSkia8888_GrPixelConfig, fbInfo);
+ GR_GL_GetIntegerv(interface.get(), GR_GL_FRAMEBUFFER_BINDING, &buffer);
+ GrGLFramebufferInfo info;
+ info.fFBOID = (GrGLuint) buffer;
+ GrBackendRenderTarget target(dm.w, dm.h, kMsaaSampleCount, kStencilBits,
+ kSkia8888_GrPixelConfig, info);
// setup SkSurface
// To use distance field text, use commented out SkSurfaceProps instead
@@ -206,10 +206,9 @@ int main(int argc, char** argv) {
// SkSurfaceProps::kLegacyFontHost_InitType);
SkSurfaceProps props(SkSurfaceProps::kLegacyFontHost_InitType);
- sk_sp<SkSurface> surface(SkSurface::MakeFromBackendRenderTarget(grContext,
- backendRT,
+ sk_sp<SkSurface> surface(SkSurface::MakeFromBackendRenderTarget(grContext.get(), target,
kBottomLeft_GrSurfaceOrigin,
- &props));
+ nullptr, &props));
SkCanvas* canvas = surface->getCanvas();