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

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

Issue 949953002: Add stencil buffer create tracking to GPU stats. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "GrGLGpu.h" 9 #include "GrGLGpu.h"
10 #include "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1160 samples, 1160 samples,
1161 sFmt.fInternalFormat, 1161 sFmt.fInternalFormat,
1162 width, height); 1162 width, height);
1163 } else { 1163 } else {
1164 GL_ALLOC_CALL(this->glInterface(), RenderbufferStorage(GR_GL_RENDERB UFFER, 1164 GL_ALLOC_CALL(this->glInterface(), RenderbufferStorage(GR_GL_RENDERB UFFER,
1165 sFmt.fInterna lFormat, 1165 sFmt.fInterna lFormat,
1166 width, height )); 1166 width, height ));
1167 created = (GR_GL_NO_ERROR == check_alloc_error(rt->desc(), this->glI nterface())); 1167 created = (GR_GL_NO_ERROR == check_alloc_error(rt->desc(), this->glI nterface()));
1168 } 1168 }
1169 if (created) { 1169 if (created) {
1170 1170 fStats.incStencilBufferCreates();
1171 // After sized formats we attempt an unsized format and take 1171 // After sized formats we attempt an unsized format and take
1172 // whatever sizes GL gives us. In that case we query for the size. 1172 // whatever sizes GL gives us. In that case we query for the size.
1173 GrGLStencilBuffer::Format format = sFmt; 1173 GrGLStencilBuffer::Format format = sFmt;
1174 get_stencil_rb_sizes(this->glInterface(), &format); 1174 get_stencil_rb_sizes(this->glInterface(), &format);
1175 SkAutoTUnref<GrStencilBuffer> sb(SkNEW_ARGS(GrGLStencilBuffer, 1175 SkAutoTUnref<GrStencilBuffer> sb(SkNEW_ARGS(GrGLStencilBuffer,
1176 (this, sbDesc, width, height, samples, format))); 1176 (this, sbDesc, width, height, samples, format)));
1177 if (this->attachStencilBufferToRenderTarget(sb, rt)) { 1177 if (this->attachStencilBufferToRenderTarget(sb, rt)) {
1178 fLastSuccessfulStencilFmtIdx = sIdx; 1178 fLastSuccessfulStencilFmtIdx = sIdx;
1179 rt->renderTargetPriv().didAttachStencilBuffer(sb); 1179 rt->renderTargetPriv().didAttachStencilBuffer(sb);
1180 return true; 1180 return true;
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2759 this->setVertexArrayID(gpu, 0); 2759 this->setVertexArrayID(gpu, 0);
2760 } 2760 }
2761 int attrCount = gpu->glCaps().maxVertexAttributes(); 2761 int attrCount = gpu->glCaps().maxVertexAttributes();
2762 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2762 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2763 fDefaultVertexArrayAttribState.resize(attrCount); 2763 fDefaultVertexArrayAttribState.resize(attrCount);
2764 } 2764 }
2765 attribState = &fDefaultVertexArrayAttribState; 2765 attribState = &fDefaultVertexArrayAttribState;
2766 } 2766 }
2767 return attribState; 2767 return attribState;
2768 } 2768 }
OLDNEW
« no previous file with comments | « src/gpu/GrTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698