OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |