Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Unified Diff: samplecode/SampleApp.cpp

Issue 12437010: Make SkOSWindow return the sample count and stencil bit count for its GL context. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/views/SkOSWindow_iOS.h ('k') | src/views/ios/SkOSWindow_iOS.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « include/views/SkOSWindow_iOS.h ('k') | src/views/ios/SkOSWindow_iOS.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698