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

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

Issue 678073005: Patch to remove constant attributes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: trivial clean up 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
« src/gpu/gl/GrGLProgramDesc.cpp ('K') | « src/gpu/gl/GrGpuGL.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 #include "GrGpuGL.h" 8 #include "GrGpuGL.h"
9 9
10 #include "builders/GrGLProgramBuilder.h" 10 #include "builders/GrGLProgramBuilder.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 fCurrentProgram.get()->ref(); 247 fCurrentProgram.get()->ref();
248 248
249 GrGLuint programID = fCurrentProgram->programID(); 249 GrGLuint programID = fCurrentProgram->programID();
250 if (fHWProgramID != programID) { 250 if (fHWProgramID != programID) {
251 GL_CALL(UseProgram(programID)); 251 GL_CALL(UseProgram(programID));
252 fHWProgramID = programID; 252 fHWProgramID = programID;
253 } 253 }
254 254
255 this->flushBlend(*optState.get(), kDrawLines_DrawType == type, srcCoeff, dstCoeff); 255 this->flushBlend(*optState.get(), kDrawLines_DrawType == type, srcCoeff, dstCoeff);
256 256
257 fCurrentProgram->setData(*optState.get(), type, dstCopy, &fSharedGLProgr amState); 257 fCurrentProgram->setData(*optState.get(), type, dstCopy);
258 } 258 }
259 259
260 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(optState->getRenderT arget()); 260 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(optState->getRenderT arget());
261 this->flushStencil(optState->getStencil(), type); 261 this->flushStencil(optState->getStencil(), type);
262 this->flushScissor(glRT->getViewport(), glRT->origin()); 262 this->flushScissor(glRT->getViewport(), glRT->origin());
263 this->flushAAState(*optState.get(), type); 263 this->flushAAState(*optState.get(), type);
264 264
265 SkIRect* devRect = NULL; 265 SkIRect* devRect = NULL;
266 SkIRect devClipBounds; 266 SkIRect devClipBounds;
267 if (optState->isClipState()) { 267 if (optState->isClipState()) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 GrGLAttribTypeToLayout(attribType).fCount, 352 GrGLAttribTypeToLayout(attribType).fCount,
353 GrGLAttribTypeToLayout(attribType).fType, 353 GrGLAttribTypeToLayout(attribType).fType,
354 GrGLAttribTypeToLayout(attribType).fNormalized, 354 GrGLAttribTypeToLayout(attribType).fNormalized,
355 stride, 355 stride,
356 reinterpret_cast<GrGLvoid*>( 356 reinterpret_cast<GrGLvoid*>(
357 vertexOffsetInBytes + vertexAttrib->fOffset)); 357 vertexOffsetInBytes + vertexAttrib->fOffset));
358 } 358 }
359 attribState->disableUnusedArrays(this, usedAttribArraysMask); 359 attribState->disableUnusedArrays(this, usedAttribArraysMask);
360 } 360 }
361 } 361 }
OLDNEW
« src/gpu/gl/GrGLProgramDesc.cpp ('K') | « src/gpu/gl/GrGpuGL.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698