| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 if (!this->getGpu()->initCopySurfaceDstDesc(rt, &desc)) { | 115 if (!this->getGpu()->initCopySurfaceDstDesc(rt, &desc)) { |
| 116 desc.fOrigin = kDefault_GrSurfaceOrigin; | 116 desc.fOrigin = kDefault_GrSurfaceOrigin; |
| 117 desc.fFlags = kRenderTarget_GrSurfaceFlag; | 117 desc.fFlags = kRenderTarget_GrSurfaceFlag; |
| 118 desc.fConfig = rt->config(); | 118 desc.fConfig = rt->config(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 | 121 |
| 122 desc.fWidth = copyRect.width(); | 122 desc.fWidth = copyRect.width(); |
| 123 desc.fHeight = copyRect.height(); | 123 desc.fHeight = copyRect.height(); |
| 124 | 124 |
| 125 SkAutoTUnref<GrTexture> copy( | 125 SkAutoTUnref<GrTexture> copy(fContext->textureProvider()->refScratchTexture(
desc, |
| 126 fContext->refScratchTexture(desc, GrContext::kApprox_ScratchTexMatch)); | 126 GrTextureProvider::kApprox_ScratchTexMatch)); |
| 127 | 127 |
| 128 if (!copy) { | 128 if (!copy) { |
| 129 SkDebugf("Failed to create temporary copy of destination texture.\n"); | 129 SkDebugf("Failed to create temporary copy of destination texture.\n"); |
| 130 return false; | 130 return false; |
| 131 } | 131 } |
| 132 SkIPoint dstPoint = {0, 0}; | 132 SkIPoint dstPoint = {0, 0}; |
| 133 if (this->copySurface(copy, rt, copyRect, dstPoint)) { | 133 if (this->copySurface(copy, rt, copyRect, dstPoint)) { |
| 134 dstCopy->setTexture(copy); | 134 dstCopy->setTexture(copy); |
| 135 dstCopy->setOffset(copyRect.fLeft, copyRect.fTop); | 135 dstCopy->setOffset(copyRect.fLeft, copyRect.fTop); |
| 136 return true; | 136 return true; |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 785 GrPipelineBuilder::AutoRestoreFragmentProcessors* a
rfp, | 785 GrPipelineBuilder::AutoRestoreFragmentProcessors* a
rfp, |
| 786 GrPipelineBuilder::AutoRestoreStencil* ars, | 786 GrPipelineBuilder::AutoRestoreStencil* ars, |
| 787 GrScissorState* scissorState, | 787 GrScissorState* scissorState, |
| 788 const SkRect* devBounds) { | 788 const SkRect* devBounds) { |
| 789 return fClipMaskManager.setupClipping(pipelineBuilder, | 789 return fClipMaskManager.setupClipping(pipelineBuilder, |
| 790 arfp, | 790 arfp, |
| 791 ars, | 791 ars, |
| 792 scissorState, | 792 scissorState, |
| 793 devBounds); | 793 devBounds); |
| 794 } | 794 } |
| OLD | NEW |