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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 } else { | 176 } else { |
177 return tex; | 177 return tex; |
178 } | 178 } |
179 } | 179 } |
180 | 180 |
181 GrRenderTarget* GrGpu::wrapBackendRenderTarget(const GrBackendRenderTargetDesc&
desc) { | 181 GrRenderTarget* GrGpu::wrapBackendRenderTarget(const GrBackendRenderTargetDesc&
desc) { |
182 this->handleDirtyContext(); | 182 this->handleDirtyContext(); |
183 return this->onWrapBackendRenderTarget(desc); | 183 return this->onWrapBackendRenderTarget(desc); |
184 } | 184 } |
185 | 185 |
186 GrVertexBuffer* GrGpu::createVertexBuffer(uint32_t size, bool dynamic) { | 186 GrVertexBuffer* GrGpu::createVertexBuffer(size_t size, bool dynamic) { |
187 this->handleDirtyContext(); | 187 this->handleDirtyContext(); |
188 return this->onCreateVertexBuffer(size, dynamic); | 188 return this->onCreateVertexBuffer(size, dynamic); |
189 } | 189 } |
190 | 190 |
191 GrIndexBuffer* GrGpu::createIndexBuffer(uint32_t size, bool dynamic) { | 191 GrIndexBuffer* GrGpu::createIndexBuffer(size_t size, bool dynamic) { |
192 this->handleDirtyContext(); | 192 this->handleDirtyContext(); |
193 return this->onCreateIndexBuffer(size, dynamic); | 193 return this->onCreateIndexBuffer(size, dynamic); |
194 } | 194 } |
195 | 195 |
196 GrPath* GrGpu::createPath(const SkPath& path, const SkStrokeRec& stroke) { | 196 GrPath* GrGpu::createPath(const SkPath& path, const SkStrokeRec& stroke) { |
197 SkASSERT(this->caps()->pathRenderingSupport()); | 197 SkASSERT(this->caps()->pathRenderingSupport()); |
198 this->handleDirtyContext(); | 198 this->handleDirtyContext(); |
199 return this->onCreatePath(path, stroke); | 199 return this->onCreatePath(path, stroke); |
200 } | 200 } |
201 | 201 |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 } | 534 } |
535 | 535 |
536 void GrGpu::releaseIndexArray() { | 536 void GrGpu::releaseIndexArray() { |
537 // if index source was array, we stowed data in the pool | 537 // if index source was array, we stowed data in the pool |
538 const GeometrySrcState& geoSrc = this->getGeomSrc(); | 538 const GeometrySrcState& geoSrc = this->getGeomSrc(); |
539 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); | 539 SkASSERT(kArray_GeometrySrcType == geoSrc.fIndexSrc); |
540 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); | 540 size_t bytes = geoSrc.fIndexCount * sizeof(uint16_t); |
541 fIndexPool->putBack(bytes); | 541 fIndexPool->putBack(bytes); |
542 --fIndexPoolUseCnt; | 542 --fIndexPoolUseCnt; |
543 } | 543 } |
OLD | NEW |