| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 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 #include "GrContext.h" | 9 #include "GrContext.h" |
| 10 | 10 |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 srcPI.fColorType = swapRAndB ? toggle_colortype32(dstPI.fColorType) : ds
tPI.fColorType; | 586 srcPI.fColorType = swapRAndB ? toggle_colortype32(dstPI.fColorType) : ds
tPI.fColorType; |
| 587 srcPI.fAlphaType = kPremul_SkAlphaType; | 587 srcPI.fAlphaType = kPremul_SkAlphaType; |
| 588 srcPI.fPixels = buffer; | 588 srcPI.fPixels = buffer; |
| 589 srcPI.fRowBytes = rowBytes; | 589 srcPI.fRowBytes = rowBytes; |
| 590 | 590 |
| 591 return srcPI.convertPixelsTo(&dstPI, width, height); | 591 return srcPI.convertPixelsTo(&dstPI, width, height); |
| 592 } | 592 } |
| 593 return true; | 593 return true; |
| 594 } | 594 } |
| 595 | 595 |
| 596 void GrContext::prepareSurfaceForExternalRead(GrSurface* surface) { | 596 void GrContext::prepareSurfaceForExternalIO(GrSurface* surface) { |
| 597 RETURN_IF_ABANDONED | 597 RETURN_IF_ABANDONED |
| 598 SkASSERT(surface); | 598 SkASSERT(surface); |
| 599 ASSERT_OWNED_RESOURCE(surface); | 599 ASSERT_OWNED_RESOURCE(surface); |
| 600 if (surface->surfacePriv().hasPendingIO()) { | 600 if (surface->surfacePriv().hasPendingIO()) { |
| 601 this->flush(); | 601 this->flush(); |
| 602 } | 602 } |
| 603 GrRenderTarget* rt = surface->asRenderTarget(); | 603 GrRenderTarget* rt = surface->asRenderTarget(); |
| 604 if (fGpu && rt) { | 604 if (fGpu && rt) { |
| 605 fGpu->resolveRenderTarget(rt); | 605 fGpu->resolveRenderTarget(rt); |
| 606 } | 606 } |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 ////////////////////////////////////////////////////////////////////////////// | 755 ////////////////////////////////////////////////////////////////////////////// |
| 756 | 756 |
| 757 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { | 757 void GrContext::addGpuTraceMarker(const GrGpuTraceMarker* marker) { |
| 758 fGpu->addGpuTraceMarker(marker); | 758 fGpu->addGpuTraceMarker(marker); |
| 759 } | 759 } |
| 760 | 760 |
| 761 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { | 761 void GrContext::removeGpuTraceMarker(const GrGpuTraceMarker* marker) { |
| 762 fGpu->removeGpuTraceMarker(marker); | 762 fGpu->removeGpuTraceMarker(marker); |
| 763 } | 763 } |
| 764 | 764 |
| OLD | NEW |