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

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

Issue 2160093002: Allow GrReducedClip to take non-integer query bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix tests on ubuntu Created 4 years, 5 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 "GrClipMaskManager.h" 10 #include "GrClipMaskManager.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 bool isHWAntiAlias, 47 bool isHWAntiAlias,
48 bool hasUserStencilSettings, 48 bool hasUserStencilSettings,
49 GrAppliedClip* out) const { 49 GrAppliedClip* out) const {
50 SkASSERT(!fDeviceBounds.isLargest()); 50 SkASSERT(!fDeviceBounds.isLargest());
51 if (fScissorState.enabled()) { 51 if (fScissorState.enabled()) {
52 SkIRect tightScissor; 52 SkIRect tightScissor;
53 if (!tightScissor.intersect(fScissorState.rect(), 53 if (!tightScissor.intersect(fScissorState.rect(),
54 SkIRect::MakeWH(drawContext->width(), drawCo ntext->height()))) { 54 SkIRect::MakeWH(drawContext->width(), drawCo ntext->height()))) {
55 return false; 55 return false;
56 } 56 }
57 if (devBounds && !devBounds->intersects(SkRect::Make(tightScissor))) { 57 if (devBounds && IsOutsideClip(tightScissor, *devBounds)) {
58 return false; 58 return false;
59 } 59 }
60 if (!devBounds || !CanIgnoreScissor(fScissorState.rect(), *devBounds)) { 60 if (!devBounds || !IsInsideClip(fScissorState.rect(), *devBounds)) {
61 if (fHasStencilClip) { 61 if (fHasStencilClip) {
62 out->makeScissoredStencil(tightScissor, &fDeviceBounds); 62 out->makeScissoredStencil(tightScissor, &fDeviceBounds);
63 } else { 63 } else {
64 out->makeScissored(tightScissor); 64 out->makeScissored(tightScissor);
65 } 65 }
66 return true; 66 return true;
67 } 67 }
68 } 68 }
69 69
70 out->makeStencil(fHasStencilClip, fDeviceBounds); 70 out->makeStencil(fHasStencilClip, fDeviceBounds);
(...skipping 25 matching lines...) Expand all
96 96
97 bool GrClipStackClip::apply(GrContext* context, 97 bool GrClipStackClip::apply(GrContext* context,
98 GrDrawContext* drawContext, 98 GrDrawContext* drawContext,
99 const SkRect* devBounds, 99 const SkRect* devBounds,
100 bool useHWAA, 100 bool useHWAA,
101 bool hasUserStencilSettings, 101 bool hasUserStencilSettings,
102 GrAppliedClip* out) const { 102 GrAppliedClip* out) const {
103 return GrClipMaskManager::SetupClipping(context, drawContext, *this, devBoun ds, 103 return GrClipMaskManager::SetupClipping(context, drawContext, *this, devBoun ds,
104 useHWAA, hasUserStencilSettings, out ); 104 useHWAA, hasUserStencilSettings, out );
105 } 105 }
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