| 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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 } | 873 } |
| 874 fVertices = NULL; | 874 fVertices = NULL; |
| 875 fIndices = NULL; | 875 fIndices = NULL; |
| 876 } | 876 } |
| 877 | 877 |
| 878 GrDrawTarget::AutoClipRestore::AutoClipRestore(GrDrawTarget* target, const SkIRe
ct& newClip) { | 878 GrDrawTarget::AutoClipRestore::AutoClipRestore(GrDrawTarget* target, const SkIRe
ct& newClip) { |
| 879 fTarget = target; | 879 fTarget = target; |
| 880 fClip = fTarget->getClip(); | 880 fClip = fTarget->getClip(); |
| 881 fStack.init(); | 881 fStack.init(); |
| 882 fStack.get()->clipDevRect(newClip, SkRegion::kReplace_Op); | 882 fStack.get()->clipDevRect(newClip, SkRegion::kReplace_Op); |
| 883 fReplacementClip.fClipStack = fStack.get(); | 883 fReplacementClip.fClipStack.reset(SkRef(fStack.get())); |
| 884 target->setClip(&fReplacementClip); | 884 target->setClip(&fReplacementClip); |
| 885 } | 885 } |
| 886 | 886 |
| 887 namespace { | 887 namespace { |
| 888 // returns true if the read/written rect intersects the src/dst and false if not
. | 888 // returns true if the read/written rect intersects the src/dst and false if not
. |
| 889 bool clip_srcrect_and_dstpoint(const GrSurface* dst, | 889 bool clip_srcrect_and_dstpoint(const GrSurface* dst, |
| 890 const GrSurface* src, | 890 const GrSurface* src, |
| 891 const SkIRect& srcRect, | 891 const SkIRect& srcRect, |
| 892 const SkIPoint& dstPoint, | 892 const SkIPoint& dstPoint, |
| 893 SkIRect* clippedSrcRect, | 893 SkIRect* clippedSrcRect, |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 GrPipelineBuilder::AutoRestoreStencil* ars, | 1244 GrPipelineBuilder::AutoRestoreStencil* ars, |
| 1245 GrScissorState* scissorState, | 1245 GrScissorState* scissorState, |
| 1246 const SkRect* devBounds) { | 1246 const SkRect* devBounds) { |
| 1247 return fClipMaskManager.setupClipping(pipelineBuilder, | 1247 return fClipMaskManager.setupClipping(pipelineBuilder, |
| 1248 are, | 1248 are, |
| 1249 ars, | 1249 ars, |
| 1250 scissorState, | 1250 scissorState, |
| 1251 this->getClip(), | 1251 this->getClip(), |
| 1252 devBounds); | 1252 devBounds); |
| 1253 } | 1253 } |
| OLD | NEW |