diff options
Diffstat (limited to 'samplecode/SampleApp.cpp')
| -rw-r--r-- | samplecode/SampleApp.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/samplecode/SampleApp.cpp b/samplecode/SampleApp.cpp index 6266085d78..badc7c01e8 100644 --- a/samplecode/SampleApp.cpp +++ b/samplecode/SampleApp.cpp @@ -188,8 +188,8 @@ public: SkASSERT(false); break; } - - bool result = win->attach(fBackend, msaaSampleCount); + AttachmentInfo attachmentInfo; + bool result = win->attach(fBackend, msaaSampleCount, &attachmentInfo); if (!result) { SkDebugf("Failed to initialize GL"); return; @@ -289,15 +289,16 @@ public: virtual void windowSizeChanged(SampleWindow* win) { #if SK_SUPPORT_GPU if (fCurContext) { - win->attach(fBackend, fMSAASampleCount); + AttachmentInfo attachmentInfo; + win->attach(fBackend, fMSAASampleCount, &attachmentInfo); GrBackendRenderTargetDesc desc; desc.fWidth = SkScalarRound(win->width()); desc.fHeight = SkScalarRound(win->height()); desc.fConfig = kSkia8888_GrPixelConfig; desc.fOrigin = kBottomLeft_GrSurfaceOrigin; - GR_GL_GetIntegerv(fCurIntf, GR_GL_SAMPLES, &desc.fSampleCnt); - GR_GL_GetIntegerv(fCurIntf, GR_GL_STENCIL_BITS, &desc.fStencilBits); + desc.fSampleCnt = attachmentInfo.fSampleCount; + desc.fStencilBits = attachmentInfo.fStencilBits; GrGLint buffer; GR_GL_GetIntegerv(fCurIntf, GR_GL_FRAMEBUFFER_BINDING, &buffer); desc.fRenderTargetHandle = buffer; |
