| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 "GrGpu.h" | 9 #include "GrGpu.h" |
| 10 | 10 |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 GrBuffer* GrGpu::createBuffer(size_t size, GrBufferType intendedType, | 244 GrBuffer* GrGpu::createBuffer(size_t size, GrBufferType intendedType, |
| 245 GrAccessPattern accessPattern, const void* data) { | 245 GrAccessPattern accessPattern, const void* data) { |
| 246 this->handleDirtyContext(); | 246 this->handleDirtyContext(); |
| 247 GrBuffer* buffer = this->onCreateBuffer(size, intendedType, accessPattern, d
ata); | 247 GrBuffer* buffer = this->onCreateBuffer(size, intendedType, accessPattern, d
ata); |
| 248 if (!this->caps()->reuseScratchBuffers()) { | 248 if (!this->caps()->reuseScratchBuffers()) { |
| 249 buffer->resourcePriv().removeScratchKey(); | 249 buffer->resourcePriv().removeScratchKey(); |
| 250 } | 250 } |
| 251 return buffer; | 251 return buffer; |
| 252 } | 252 } |
| 253 | 253 |
| 254 gr_instanced::InstancedRendering* GrGpu::createInstancedRendering() { |
| 255 SkASSERT(GrCaps::InstancedSupport::kNone != this->caps()->instancedSupport()
); |
| 256 return this->onCreateInstancedRendering(); |
| 257 } |
| 258 |
| 254 bool GrGpu::copySurface(GrSurface* dst, | 259 bool GrGpu::copySurface(GrSurface* dst, |
| 255 GrSurface* src, | 260 GrSurface* src, |
| 256 const SkIRect& srcRect, | 261 const SkIRect& srcRect, |
| 257 const SkIPoint& dstPoint) { | 262 const SkIPoint& dstPoint) { |
| 258 SkASSERT(dst && src); | 263 SkASSERT(dst && src); |
| 259 this->handleDirtyContext(); | 264 this->handleDirtyContext(); |
| 260 return this->onCopySurface(dst, src, srcRect, dstPoint); | 265 return this->onCopySurface(dst, src, srcRect, dstPoint); |
| 261 } | 266 } |
| 262 | 267 |
| 263 bool GrGpu::getReadPixelsInfo(GrSurface* srcSurface, int width, int height, size
_t rowBytes, | 268 bool GrGpu::getReadPixelsInfo(GrSurface* srcSurface, int width, int height, size
_t rowBytes, |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 478 // This doesn't have geometric meaning. We just need to define an orderi
ng for std::map. | 483 // This doesn't have geometric meaning. We just need to define an orderi
ng for std::map. |
| 479 if (a[i].x() != b[i].x()) { | 484 if (a[i].x() != b[i].x()) { |
| 480 return a[i].x() < b[i].x(); | 485 return a[i].x() < b[i].x(); |
| 481 } | 486 } |
| 482 if (a[i].y() != b[i].y()) { | 487 if (a[i].y() != b[i].y()) { |
| 483 return a[i].y() < b[i].y(); | 488 return a[i].y() < b[i].y(); |
| 484 } | 489 } |
| 485 } | 490 } |
| 486 return false; // Equal. | 491 return false; // Equal. |
| 487 } | 492 } |
| OLD | NEW |