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

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

Issue 674543004: OptState owns program descriptor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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
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 "GrGpuGL.h" 9 #include "GrGpuGL.h"
10 #include "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 2562 matching lines...) Expand 10 before | Expand all | Expand 10 after
2573 SkString markerString = markerArray.toStringLast(); 2573 SkString markerString = markerArray.toStringLast();
2574 GL_CALL(PushGroupMarker(0, markerString.c_str())); 2574 GL_CALL(PushGroupMarker(0, markerString.c_str()));
2575 } 2575 }
2576 } 2576 }
2577 2577
2578 void GrGpuGL::didRemoveGpuTraceMarker() { 2578 void GrGpuGL::didRemoveGpuTraceMarker() {
2579 if (this->caps()->gpuTracingSupport()) { 2579 if (this->caps()->gpuTracingSupport()) {
2580 GL_CALL(PopGroupMarker()); 2580 GL_CALL(PopGroupMarker());
2581 } 2581 }
2582 } 2582 }
2583
2583 /////////////////////////////////////////////////////////////////////////////// 2584 ///////////////////////////////////////////////////////////////////////////////
2584 2585
2585 GrGLAttribArrayState* GrGpuGL::HWGeometryState::bindArrayAndBuffersToDraw( 2586 GrGLAttribArrayState* GrGpuGL::HWGeometryState::bindArrayAndBuffersToDraw(
2586 GrGpuGL* gpu, 2587 GrGpuGL* gpu,
2587 const GrGLVertexBuffer* vbuffer, 2588 const GrGLVertexBuffer* vbuffer,
2588 const GrGLIndexBuffer* ibuffer) { 2589 const GrGLIndexBuffer* ibuffer) {
2589 SkASSERT(vbuffer); 2590 SkASSERT(vbuffer);
2590 GrGLAttribArrayState* attribState; 2591 GrGLAttribArrayState* attribState;
2591 2592
2592 // We use a vertex array if we're on a core profile and the verts are in a V BO. 2593 // We use a vertex array if we're on a core profile and the verts are in a V BO.
(...skipping 13 matching lines...) Expand all
2606 this->setVertexArrayID(gpu, 0); 2607 this->setVertexArrayID(gpu, 0);
2607 } 2608 }
2608 int attrCount = gpu->glCaps().maxVertexAttributes(); 2609 int attrCount = gpu->glCaps().maxVertexAttributes();
2609 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2610 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2610 fDefaultVertexArrayAttribState.resize(attrCount); 2611 fDefaultVertexArrayAttribState.resize(attrCount);
2611 } 2612 }
2612 attribState = &fDefaultVertexArrayAttribState; 2613 attribState = &fDefaultVertexArrayAttribState;
2613 } 2614 }
2614 return attribState; 2615 return attribState;
2615 } 2616 }
OLDNEW
« src/gpu/gl/GrGpuGL.h ('K') | « src/gpu/gl/GrGpuGL.h ('k') | src/gpu/gl/GrGpuGL_program.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698