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

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

Issue 936943002: Pass clip to context (Closed) Base URL: https://skia.googlesource.com/skia.git@pass_down_rendertarget
Patch Set: more cleanup Created 5 years, 10 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
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 17 matching lines...) Expand all
28 if (isIntersectionOfRects) { 28 if (isIntersectionOfRects) {
29 *isIntersectionOfRects = true; 29 *isIntersectionOfRects = true;
30 } 30 }
31 } break; 31 } break;
32 case kIRect_ClipType: { 32 case kIRect_ClipType: {
33 *devResult = this->irect(); 33 *devResult = this->irect();
34 if (isIntersectionOfRects) { 34 if (isIntersectionOfRects) {
35 *isIntersectionOfRects = true; 35 *isIntersectionOfRects = true;
36 } 36 }
37 } break; 37 } break;
38 case kRect_ClipType: {
39 devResult->setLTRB(SkScalarCeilToInt(this->rect().fLeft),
40 SkScalarCeilToInt(this->rect().fTop),
41 SkScalarCeilToInt(this->rect().fRight),
42 SkScalarCeilToInt(this->rect().fBottom));
43 if (isIntersectionOfRects) {
44 *isIntersectionOfRects = true;
45 }
46 } break;
38 case kClipStack_ClipType: { 47 case kClipStack_ClipType: {
39 SkRect devBounds; 48 SkRect devBounds;
40 this->clipStack()->getConservativeBounds(-this->origin().fX, 49 this->clipStack()->getConservativeBounds(-this->origin().fX,
41 -this->origin().fY, 50 -this->origin().fY,
42 width, 51 width,
43 height, 52 height,
44 &devBounds, 53 &devBounds,
45 isIntersectionOfRects); 54 isIntersectionOfRects);
46 devBounds.roundOut(devResult); 55 devBounds.roundOut(devResult);
47 } break; 56 } break;
48 57
49 } 58 }
50 } 59 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698