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(); | |
346 } | 345 } |
347 } | 346 } |
348 | 347 |
349 namespace { | 348 namespace { |
350 | 349 |
351 GrSurfaceOrigin resolve_origin(GrSurfaceOrigin origin, bool renderTarget) { | 350 GrSurfaceOrigin resolve_origin(GrSurfaceOrigin origin, bool renderTarget) { |
352 // By default, GrRenderTargets are GL's normal orientation so that they | 351 // By default, GrRenderTargets are GL's normal orientation so that they |
353 // can be drawn to by the outside world without the client having | 352 // can be drawn to by the outside world without the client having |
354 // to render upside down. | 353 // to render upside down. |
355 if (kDefault_GrSurfaceOrigin == origin) { | 354 if (kDefault_GrSurfaceOrigin == origin) { |
(...skipping 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2610 this->setVertexArrayID(gpu, 0); | 2609 this->setVertexArrayID(gpu, 0); |
2611 } | 2610 } |
2612 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2611 int attrCount = gpu->glCaps().maxVertexAttributes(); |
2613 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2612 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
2614 fDefaultVertexArrayAttribState.resize(attrCount); | 2613 fDefaultVertexArrayAttribState.resize(attrCount); |
2615 } | 2614 } |
2616 attribState = &fDefaultVertexArrayAttribState; | 2615 attribState = &fDefaultVertexArrayAttribState; |
2617 } | 2616 } |
2618 return attribState; | 2617 return attribState; |
2619 } | 2618 } |
OLD | NEW |