Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: src/gpu/GrClip.cpp

Issue 989443003: Remove rect clip type from grclip. (Closed) Base URL: https://skia.googlesource.com/skia.git@clipfix
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/gpu/GrClip.h ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "GrClip.h"
9 9
10 #include "GrSurface.h" 10 #include "GrSurface.h"
(...skipping 15 matching lines...) Expand all
26 if (isIntersectionOfRects) { 26 if (isIntersectionOfRects) {
27 *isIntersectionOfRects = true; 27 *isIntersectionOfRects = true;
28 } 28 }
29 } break; 29 } break;
30 case kIRect_ClipType: { 30 case kIRect_ClipType: {
31 *devResult = this->irect(); 31 *devResult = this->irect();
32 if (isIntersectionOfRects) { 32 if (isIntersectionOfRects) {
33 *isIntersectionOfRects = true; 33 *isIntersectionOfRects = true;
34 } 34 }
35 } break; 35 } break;
36 case kRect_ClipType: {
37 devResult->setLTRB(SkScalarCeilToInt(this->rect().fLeft),
38 SkScalarCeilToInt(this->rect().fTop),
39 SkScalarCeilToInt(this->rect().fRight),
40 SkScalarCeilToInt(this->rect().fBottom));
41 if (isIntersectionOfRects) {
42 *isIntersectionOfRects = true;
43 }
44 } break;
45 case kClipStack_ClipType: { 36 case kClipStack_ClipType: {
46 SkRect devBounds; 37 SkRect devBounds;
47 this->clipStack()->getConservativeBounds(-this->origin().fX, 38 this->clipStack()->getConservativeBounds(-this->origin().fX,
48 -this->origin().fY, 39 -this->origin().fY,
49 width, 40 width,
50 height, 41 height,
51 &devBounds, 42 &devBounds,
52 isIntersectionOfRects); 43 isIntersectionOfRects);
53 devBounds.roundOut(devResult); 44 devBounds.roundOut(devResult);
54 } break; 45 } break;
55 46
56 } 47 }
57 } 48 }
58 49
59 const GrClip& GrClip::WideOpen() { 50 const GrClip& GrClip::WideOpen() {
60 static const GrClip clip; 51 static const GrClip clip;
61 return clip; 52 return clip;
62 } 53 }
OLDNEW
« no previous file with comments | « include/gpu/GrClip.h ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698