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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 size_t rowBytes) { | 390 size_t rowBytes) { |
391 GrMipLevel mipLevel; | 391 GrMipLevel mipLevel; |
392 mipLevel.fPixels = buffer; | 392 mipLevel.fPixels = buffer; |
393 mipLevel.fRowBytes = rowBytes; | 393 mipLevel.fRowBytes = rowBytes; |
394 SkSTArray<1, GrMipLevel> texels; | 394 SkSTArray<1, GrMipLevel> texels; |
395 texels.push_back(mipLevel); | 395 texels.push_back(mipLevel); |
396 | 396 |
397 return this->writePixels(surface, left, top, width, height, config, texels); | 397 return this->writePixels(surface, left, top, width, height, config, texels); |
398 } | 398 } |
399 | 399 |
400 bool GrGpu::transferPixels(GrTexture* texture, | 400 bool GrGpu::transferPixels(GrSurface* surface, |
401 int left, int top, int width, int height, | 401 int left, int top, int width, int height, |
402 GrPixelConfig config, GrBuffer* transferBuffer, | 402 GrPixelConfig config, GrBuffer* transferBuffer, |
403 size_t offset, size_t rowBytes) { | 403 size_t offset, size_t rowBytes) { |
404 SkASSERT(transferBuffer); | 404 SkASSERT(transferBuffer); |
405 | 405 |
406 this->handleDirtyContext(); | 406 this->handleDirtyContext(); |
407 if (this->onTransferPixels(texture, left, top, width, height, config, | 407 if (this->onTransferPixels(surface, left, top, width, height, config, |
408 transferBuffer, offset, rowBytes)) { | 408 transferBuffer, offset, rowBytes)) { |
409 fStats.incTransfersToTexture(); | 409 fStats.incTransfersToTexture(); |
410 return true; | 410 return true; |
411 } | 411 } |
412 return false; | 412 return false; |
413 } | 413 } |
414 | 414 |
415 void GrGpu::resolveRenderTarget(GrRenderTarget* target) { | 415 void GrGpu::resolveRenderTarget(GrRenderTarget* target) { |
416 SkASSERT(target); | 416 SkASSERT(target); |
417 this->handleDirtyContext(); | 417 this->handleDirtyContext(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 int meshCount) { | 481 int meshCount) { |
482 if (primProc.numAttribs() > this->caps()->maxVertexAttributes()) { | 482 if (primProc.numAttribs() > this->caps()->maxVertexAttributes()) { |
483 fStats.incNumFailedDraws(); | 483 fStats.incNumFailedDraws(); |
484 return false; | 484 return false; |
485 } | 485 } |
486 this->handleDirtyContext(); | 486 this->handleDirtyContext(); |
487 | 487 |
488 this->onDraw(pipeline, primProc, meshes, meshCount); | 488 this->onDraw(pipeline, primProc, meshes, meshCount); |
489 return true; | 489 return true; |
490 } | 490 } |
OLD | NEW |