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

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

Issue 1229143007: Start to propagate constness of GrPipelineBuilder up the stack (Closed) Base URL: https://skia.googlesource.com/skia.git@const-fix
Patch Set: rebase Created 5 years, 5 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/gl/GrGLGpu.h ('k') | tests/GLProgramsTest.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 "GrGLGpu.h" 9 #include "GrGLGpu.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 2658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 } 2669 }
2670 2670
2671 void GrGLGpu::unbindTextureFromFBO(GrGLenum fboTarget) { 2671 void GrGLGpu::unbindTextureFromFBO(GrGLenum fboTarget) {
2672 GR_GL_CALL(this->glInterface(), FramebufferTexture2D(fboTarget, 2672 GR_GL_CALL(this->glInterface(), FramebufferTexture2D(fboTarget,
2673 GR_GL_COLOR_ATTACHMENT0 , 2673 GR_GL_COLOR_ATTACHMENT0 ,
2674 GR_GL_TEXTURE_2D, 2674 GR_GL_TEXTURE_2D,
2675 0, 2675 0,
2676 0)); 2676 0));
2677 } 2677 }
2678 2678
2679 bool GrGLGpu::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) { 2679 bool GrGLGpu::initCopySurfaceDstDesc(const GrSurface* src, GrSurfaceDesc* desc) const {
2680 // If the src is a texture, we can implement the blit as a draw assuming the config is 2680 // If the src is a texture, we can implement the blit as a draw assuming the config is
2681 // renderable. 2681 // renderable.
2682 if (src->asTexture() && this->caps()->isConfigRenderable(src->config(), fals e)) { 2682 if (src->asTexture() && this->caps()->isConfigRenderable(src->config(), fals e)) {
2683 desc->fOrigin = kDefault_GrSurfaceOrigin; 2683 desc->fOrigin = kDefault_GrSurfaceOrigin;
2684 desc->fFlags = kRenderTarget_GrSurfaceFlag; 2684 desc->fFlags = kRenderTarget_GrSurfaceFlag;
2685 desc->fConfig = src->config(); 2685 desc->fConfig = src->config();
2686 return true; 2686 return true;
2687 } 2687 }
2688 2688
2689 // We look for opportunities to use CopyTexSubImage, or fbo blit. If neither are 2689 // We look for opportunities to use CopyTexSubImage, or fbo blit. If neither are
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
3156 this->setVertexArrayID(gpu, 0); 3156 this->setVertexArrayID(gpu, 0);
3157 } 3157 }
3158 int attrCount = gpu->glCaps().maxVertexAttributes(); 3158 int attrCount = gpu->glCaps().maxVertexAttributes();
3159 if (fDefaultVertexArrayAttribState.count() != attrCount) { 3159 if (fDefaultVertexArrayAttribState.count() != attrCount) {
3160 fDefaultVertexArrayAttribState.resize(attrCount); 3160 fDefaultVertexArrayAttribState.resize(attrCount);
3161 } 3161 }
3162 attribState = &fDefaultVertexArrayAttribState; 3162 attribState = &fDefaultVertexArrayAttribState;
3163 } 3163 }
3164 return attribState; 3164 return attribState;
3165 } 3165 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698