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

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: cleaup Created 6 years, 1 month 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/gl/GrGpuGL.h ('k') | src/gpu/gl/GrGpuGL_program.cpp » ('j') | 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 "GrGpuGL.h" 9 #include "GrGpuGL.h"
10 #include "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 2565 matching lines...) Expand 10 before | Expand all | Expand 10 after
2576 SkString markerString = markerArray.toStringLast(); 2576 SkString markerString = markerArray.toStringLast();
2577 GL_CALL(PushGroupMarker(0, markerString.c_str())); 2577 GL_CALL(PushGroupMarker(0, markerString.c_str()));
2578 } 2578 }
2579 } 2579 }
2580 2580
2581 void GrGpuGL::didRemoveGpuTraceMarker() { 2581 void GrGpuGL::didRemoveGpuTraceMarker() {
2582 if (this->caps()->gpuTracingSupport()) { 2582 if (this->caps()->gpuTracingSupport()) {
2583 GL_CALL(PopGroupMarker()); 2583 GL_CALL(PopGroupMarker());
2584 } 2584 }
2585 } 2585 }
2586
2586 /////////////////////////////////////////////////////////////////////////////// 2587 ///////////////////////////////////////////////////////////////////////////////
2587 2588
2588 GrGLAttribArrayState* GrGpuGL::HWGeometryState::bindArrayAndBuffersToDraw( 2589 GrGLAttribArrayState* GrGpuGL::HWGeometryState::bindArrayAndBuffersToDraw(
2589 GrGpuGL* gpu, 2590 GrGpuGL* gpu,
2590 const GrGLVertexBuffer* vbuffer, 2591 const GrGLVertexBuffer* vbuffer,
2591 const GrGLIndexBuffer* ibuffer) { 2592 const GrGLIndexBuffer* ibuffer) {
2592 SkASSERT(vbuffer); 2593 SkASSERT(vbuffer);
2593 GrGLAttribArrayState* attribState; 2594 GrGLAttribArrayState* attribState;
2594 2595
2595 // We use a vertex array if we're on a core profile and the verts are in a V BO. 2596 // 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
2609 this->setVertexArrayID(gpu, 0); 2610 this->setVertexArrayID(gpu, 0);
2610 } 2611 }
2611 int attrCount = gpu->glCaps().maxVertexAttributes(); 2612 int attrCount = gpu->glCaps().maxVertexAttributes();
2612 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2613 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2613 fDefaultVertexArrayAttribState.resize(attrCount); 2614 fDefaultVertexArrayAttribState.resize(attrCount);
2614 } 2615 }
2615 attribState = &fDefaultVertexArrayAttribState; 2616 attribState = &fDefaultVertexArrayAttribState;
2616 } 2617 }
2617 return attribState; 2618 return attribState;
2618 } 2619 }
OLDNEW
« no previous file with comments | « 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