| Index: samplecode/SampleApp.cpp
|
| ===================================================================
|
| --- samplecode/SampleApp.cpp (revision 7991)
|
| +++ samplecode/SampleApp.cpp (working copy)
|
| @@ -188,8 +188,8 @@
|
| 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 @@
|
| 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;
|
|
|