| 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 #include "GrClip.h" | 8 #include "GrFixedClip.h" |
| 9 | 9 |
| 10 #include "GrAppliedClip.h" | 10 #include "GrAppliedClip.h" |
| 11 #include "GrDrawContext.h" | 11 #include "GrDrawContext.h" |
| 12 | 12 |
| 13 void GrNoClip::getConservativeBounds(int width, int height, SkIRect* devResult, | |
| 14 bool* isIntersectionOfRects) const { | |
| 15 devResult->setXYWH(0, 0, width, height); | |
| 16 if (isIntersectionOfRects) { | |
| 17 *isIntersectionOfRects = true; | |
| 18 } | |
| 19 } | |
| 20 | |
| 21 bool GrFixedClip::quickContains(const SkRect& rect) const { | 13 bool GrFixedClip::quickContains(const SkRect& rect) const { |
| 22 if (fHasStencilClip) { | 14 if (fHasStencilClip) { |
| 23 return false; | 15 return false; |
| 24 } | 16 } |
| 25 return !fScissorState.enabled() || GrClip::IsInsideClip(fScissorState.rect()
, rect); | 17 return !fScissorState.enabled() || GrClip::IsInsideClip(fScissorState.rect()
, rect); |
| 26 } | 18 } |
| 27 | 19 |
| 28 void GrFixedClip::getConservativeBounds(int width, int height, SkIRect* devResul
t, | 20 void GrFixedClip::getConservativeBounds(int width, int height, SkIRect* devResul
t, |
| 29 bool* isIntersectionOfRects) const { | 21 bool* isIntersectionOfRects) const { |
| 30 devResult->setXYWH(0, 0, width, height); | 22 devResult->setXYWH(0, 0, width, height); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 53 out->addScissor(tightScissor); | 45 out->addScissor(tightScissor); |
| 54 } | 46 } |
| 55 } | 47 } |
| 56 | 48 |
| 57 if (fHasStencilClip) { | 49 if (fHasStencilClip) { |
| 58 out->addStencilClip(); | 50 out->addStencilClip(); |
| 59 } | 51 } |
| 60 | 52 |
| 61 return true; | 53 return true; |
| 62 } | 54 } |
| OLD | NEW |