OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #include "GrGpu.h" | 10 #include "GrGpu.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 6, | 291 6, |
292 MAX_QUADS, | 292 MAX_QUADS, |
293 4); | 293 4); |
294 } | 294 } |
295 | 295 |
296 return fQuadIndexBuffer; | 296 return fQuadIndexBuffer; |
297 } | 297 } |
298 | 298 |
299 //////////////////////////////////////////////////////////////////////////////// | 299 //////////////////////////////////////////////////////////////////////////////// |
300 | 300 |
301 bool GrGpu::setupClipAndFlushState(DrawType type, const GrDeviceCoordTexture* ds
tCopy, | 301 bool GrGpu::setupClipAndFlushState(DrawType type, |
| 302 const GrDeviceCoordTexture* dstCopy, |
302 GrDrawState::AutoRestoreEffects* are, | 303 GrDrawState::AutoRestoreEffects* are, |
303 const SkRect* devBounds) { | 304 const SkRect* devBounds) { |
304 if (!fClipMaskManager.setupClipping(this->getClip(), are, devBounds)) { | 305 GrDrawState::AutoRestoreStencil asr; |
| 306 if (!fClipMaskManager.setupClipping(this->getClip(), are, &asr, devBounds))
{ |
305 return false; | 307 return false; |
306 } | 308 } |
307 | 309 |
308 if (!this->flushGraphicsState(type, dstCopy)) { | 310 if (!this->flushGraphicsState(type, dstCopy)) { |
309 return false; | 311 return false; |
310 } | 312 } |
311 | 313 |
312 return true; | 314 return true; |
313 } | 315 } |
314 | 316 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 } | 526 } |
525 | 527 |
526 void GrGpu::releaseIndexArray() { | 528 void GrGpu::releaseIndexArray() { |
527 // if index source was array, we stowed data in the pool | 529 // if index source was array, we stowed data in the pool |
528 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 530 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
529 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 531 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
530 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 532 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
531 fIndexPool->putBack(bytes); | 533 fIndexPool->putBack(bytes); |
532 --fIndexPoolUseCnt; | 534 --fIndexPoolUseCnt; |
533 } | 535 } |
OLD | NEW |