| 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 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 } | 1349 } |
| 1350 | 1350 |
| 1351 void GrGpuGL::disableScissor() { | 1351 void GrGpuGL::disableScissor() { |
| 1352 if (kNo_TriState != fHWScissorSettings.fEnabled) { | 1352 if (kNo_TriState != fHWScissorSettings.fEnabled) { |
| 1353 GL_CALL(Disable(GR_GL_SCISSOR_TEST)); | 1353 GL_CALL(Disable(GR_GL_SCISSOR_TEST)); |
| 1354 fHWScissorSettings.fEnabled = kNo_TriState; | 1354 fHWScissorSettings.fEnabled = kNo_TriState; |
| 1355 return; | 1355 return; |
| 1356 } | 1356 } |
| 1357 } | 1357 } |
| 1358 | 1358 |
| 1359 void GrGpuGL::onClear(GrRenderTarget* target, const SkIRect* rect, GrColor color
, | 1359 void GrGpuGL::onGpuClear(GrRenderTarget* target, const SkIRect* rect, GrColor co
lor, |
| 1360 bool canIgnoreRect) { | 1360 bool canIgnoreRect) { |
| 1361 // parent class should never let us get here with no RT | 1361 // parent class should never let us get here with no RT |
| 1362 SkASSERT(target); | 1362 SkASSERT(target); |
| 1363 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(target); | 1363 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(target); |
| 1364 | 1364 |
| 1365 if (canIgnoreRect && this->glCaps().fullClearIsFree()) { | 1365 if (canIgnoreRect && this->glCaps().fullClearIsFree()) { |
| 1366 rect = NULL; | 1366 rect = NULL; |
| 1367 } | 1367 } |
| 1368 | 1368 |
| 1369 SkIRect clippedRect; | 1369 SkIRect clippedRect; |
| 1370 if (rect) { | 1370 if (rect) { |
| (...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2556 this->setVertexArrayID(gpu, 0); | 2556 this->setVertexArrayID(gpu, 0); |
| 2557 } | 2557 } |
| 2558 int attrCount = gpu->glCaps().maxVertexAttributes(); | 2558 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 2559 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 2559 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 2560 fDefaultVertexArrayAttribState.resize(attrCount); | 2560 fDefaultVertexArrayAttribState.resize(attrCount); |
| 2561 } | 2561 } |
| 2562 attribState = &fDefaultVertexArrayAttribState; | 2562 attribState = &fDefaultVertexArrayAttribState; |
| 2563 } | 2563 } |
| 2564 return attribState; | 2564 return attribState; |
| 2565 } | 2565 } |
| OLD | NEW |