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

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

Issue 683203002: Revert of Patch to remove constant attributes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 if (this->glCaps().unpackFlipYSupport()) { 335 if (this->glCaps().unpackFlipYSupport()) {
336 GL_CALL(PixelStorei(GR_GL_UNPACK_FLIP_Y, GR_GL_FALSE)); 336 GL_CALL(PixelStorei(GR_GL_UNPACK_FLIP_Y, GR_GL_FALSE));
337 } 337 }
338 if (this->glCaps().packFlipYSupport()) { 338 if (this->glCaps().packFlipYSupport()) {
339 GL_CALL(PixelStorei(GR_GL_PACK_REVERSE_ROW_ORDER, GR_GL_FALSE)); 339 GL_CALL(PixelStorei(GR_GL_PACK_REVERSE_ROW_ORDER, GR_GL_FALSE));
340 } 340 }
341 } 341 }
342 342
343 if (resetBits & kProgram_GrGLBackendState) { 343 if (resetBits & kProgram_GrGLBackendState) {
344 fHWProgramID = 0; 344 fHWProgramID = 0;
345 fSharedGLProgramState.invalidate();
345 } 346 }
346 } 347 }
347 348
348 namespace { 349 namespace {
349 350
350 GrSurfaceOrigin resolve_origin(GrSurfaceOrigin origin, bool renderTarget) { 351 GrSurfaceOrigin resolve_origin(GrSurfaceOrigin origin, bool renderTarget) {
351 // By default, GrRenderTargets are GL's normal orientation so that they 352 // By default, GrRenderTargets are GL's normal orientation so that they
352 // can be drawn to by the outside world without the client having 353 // can be drawn to by the outside world without the client having
353 // to render upside down. 354 // to render upside down.
354 if (kDefault_GrSurfaceOrigin == origin) { 355 if (kDefault_GrSurfaceOrigin == origin) {
(...skipping 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after
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