aboutsummaryrefslogtreecommitdiff
path: root/samplecode/SampleApp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'samplecode/SampleApp.cpp')
-rw-r--r--samplecode/SampleApp.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp
index aa2130e8f0..dd771cec2d 100644
--- a/samplecode/SampleApp.cpp
+++ b/samplecode/SampleApp.cpp
@@ -315,20 +315,8 @@ public:
if (fCurContext) {
AttachmentInfo attachmentInfo;
win->attach(fBackend, fMSAASampleCount, &attachmentInfo);
-
- GrBackendRenderTargetDesc desc;
- desc.fWidth = SkScalarRoundToInt(win->width());
- desc.fHeight = SkScalarRoundToInt(win->height());
- desc.fConfig = kSkia8888_GrPixelConfig;
- desc.fOrigin = kBottomLeft_GrSurfaceOrigin;
- desc.fSampleCnt = attachmentInfo.fSampleCount;
- desc.fStencilBits = attachmentInfo.fStencilBits;
- GrGLint buffer;
- GR_GL_GetIntegerv(fCurIntf, GR_GL_FRAMEBUFFER_BINDING, &buffer);
- desc.fRenderTargetHandle = buffer;
-
SkSafeUnref(fCurRenderTarget);
- fCurRenderTarget = fCurContext->wrapBackendRenderTarget(desc);
+ fCurRenderTarget = win->renderTarget(attachmentInfo, fCurIntf, fCurContext);
}
#endif
}