| 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 #include "GrDrawTarget.h" | 9 #include "GrDrawTarget.h" |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 desc.fOrigin = kDefault_GrSurfaceOrigin; | 85 desc.fOrigin = kDefault_GrSurfaceOrigin; |
| 86 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 86 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
| 87 desc.fConfig = rt->config(); | 87 desc.fConfig = rt->config(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 | 90 |
| 91 desc.fWidth = copyRect.width(); | 91 desc.fWidth = copyRect.width(); |
| 92 desc.fHeight = copyRect.height(); | 92 desc.fHeight = copyRect.height(); |
| 93 | 93 |
| 94 SkAutoTUnref<GrTexture> copy(fContext->textureProvider()->refScratchTexture(
desc, | 94 SkAutoTUnref<GrTexture> copy(fContext->textureProvider()->refScratchTexture(
desc, |
| 95 GrTextureProvider::kApprox_ScratchTexMatch)); | 95 GrTextureProvider::kApprox_ScratchMatch)); |
| 96 | 96 |
| 97 if (!copy) { | 97 if (!copy) { |
| 98 SkDebugf("Failed to create temporary copy of destination texture.\n"); | 98 SkDebugf("Failed to create temporary copy of destination texture.\n"); |
| 99 return false; | 99 return false; |
| 100 } | 100 } |
| 101 SkIPoint dstPoint = {0, 0}; | 101 SkIPoint dstPoint = {0, 0}; |
| 102 if (this->copySurface(copy, rt, copyRect, dstPoint)) { | 102 if (this->copySurface(copy, rt, copyRect, dstPoint)) { |
| 103 dstCopy->setTexture(copy); | 103 dstCopy->setTexture(copy); |
| 104 dstCopy->setOffset(copyRect.fLeft, copyRect.fTop); | 104 dstCopy->setOffset(copyRect.fLeft, copyRect.fTop); |
| 105 return true; | 105 return true; |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 GrPipelineBuilder::AutoRestoreFragmentProcessors* a
rfp, | 777 GrPipelineBuilder::AutoRestoreFragmentProcessors* a
rfp, |
| 778 GrPipelineBuilder::AutoRestoreStencil* ars, | 778 GrPipelineBuilder::AutoRestoreStencil* ars, |
| 779 GrScissorState* scissorState, | 779 GrScissorState* scissorState, |
| 780 const SkRect* devBounds) { | 780 const SkRect* devBounds) { |
| 781 return fClipMaskManager.setupClipping(pipelineBuilder, | 781 return fClipMaskManager.setupClipping(pipelineBuilder, |
| 782 arfp, | 782 arfp, |
| 783 ars, | 783 ars, |
| 784 scissorState, | 784 scissorState, |
| 785 devBounds); | 785 devBounds); |
| 786 } | 786 } |
| OLD | NEW |