diff options
| author | caryclark <caryclark@google.com> | 2015-01-30 12:37:02 -0800 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2015-01-30 12:37:02 -0800 |
| commit | c8fcafb3f0d152fb92465451bdb2e4bd3ef37222 (patch) | |
| tree | ed205c0bdd413c88bec4a59373f64dcc04760cfe /samplecode/SampleApp.cpp | |
| parent | 8d17a13a71edb0d8412e4354c428582b74587b79 (diff) | |
First cut at cleaning up Sergio's example code and moving some common code to SkWindow.
Eventually, this will be moved to be a peer of SampleApp so it is compiled by the bots to avoid future bit rot.
Also ignore XCode auto-generated flag in CommandLineFlags, and remove the unused multiple-example part.
Review URL: https://codereview.chromium.org/890873003
Diffstat (limited to 'samplecode/SampleApp.cpp')
| -rw-r--r-- | samplecode/SampleApp.cpp | 14 |
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 } |
