| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 art.set(this->drawState(), renderTarget); | 212 art.set(this->drawState(), renderTarget); |
| 213 } | 213 } |
| 214 if (NULL == this->getDrawState().getRenderTarget()) { | 214 if (NULL == this->getDrawState().getRenderTarget()) { |
| 215 SkASSERT(0); | 215 SkASSERT(0); |
| 216 return; | 216 return; |
| 217 } | 217 } |
| 218 this->handleDirtyContext(); | 218 this->handleDirtyContext(); |
| 219 this->onClear(rect, color, canIgnoreRect); | 219 this->onClear(rect, color, canIgnoreRect); |
| 220 } | 220 } |
| 221 | 221 |
| 222 void GrGpu::insertEventMarker(const char* marker) { |
| 223 this->onInsertEventMarker(marker); |
| 224 } |
| 225 void GrGpu::pushGroupMarker(const char* marker) { |
| 226 this->onPushGroupMarker(marker); |
| 227 } |
| 228 void GrGpu::popGroupMarker() { |
| 229 this->onPopGroupMarker(); |
| 230 } |
| 231 |
| 222 void GrGpu::forceRenderTargetFlush() { | 232 void GrGpu::forceRenderTargetFlush() { |
| 223 this->handleDirtyContext(); | 233 this->handleDirtyContext(); |
| 224 this->onForceRenderTargetFlush(); | 234 this->onForceRenderTargetFlush(); |
| 225 } | 235 } |
| 226 | 236 |
| 227 bool GrGpu::readPixels(GrRenderTarget* target, | 237 bool GrGpu::readPixels(GrRenderTarget* target, |
| 228 int left, int top, int width, int height, | 238 int left, int top, int width, int height, |
| 229 GrPixelConfig config, void* buffer, | 239 GrPixelConfig config, void* buffer, |
| 230 size_t rowBytes) { | 240 size_t rowBytes) { |
| 231 this->handleDirtyContext(); | 241 this->handleDirtyContext(); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 } | 549 } |
| 540 | 550 |
| 541 void GrGpu::releaseIndexArray() { | 551 void GrGpu::releaseIndexArray() { |
| 542 // if index source was array, we stowed data in the pool | 552 // if index source was array, we stowed data in the pool |
| 543 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 553 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
| 544 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 554 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
| 545 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 555 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
| 546 fIndexPool->putBack(bytes); | 556 fIndexPool->putBack(bytes); |
| 547 --fIndexPoolUseCnt; | 557 --fIndexPoolUseCnt; |
| 548 } | 558 } |
| OLD | NEW |