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

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

Issue 2147443004: Retract PipelineBuilder from GrClip::apply (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Appease some compilers 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.h » ('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 23 matching lines...) Expand all
34 if (fScissorState.enabled()) { 34 if (fScissorState.enabled()) {
35 if (!devResult->intersect(fScissorState.rect())) { 35 if (!devResult->intersect(fScissorState.rect())) {
36 devResult->setEmpty(); 36 devResult->setEmpty();
37 } 37 }
38 } 38 }
39 if (isIntersectionOfRects) { 39 if (isIntersectionOfRects) {
40 *isIntersectionOfRects = true; 40 *isIntersectionOfRects = true;
41 } 41 }
42 } 42 }
43 43
44 bool GrFixedClip::apply(GrContext*, const GrPipelineBuilder& pipelineBuilder, 44 bool GrFixedClip::apply(GrContext*,
45 GrDrawContext* drawContext, 45 GrDrawContext* drawContext,
46 const SkRect* devBounds, GrAppliedClip* out) const { 46 const SkRect* devBounds,
47 bool isHWAntiAlias,
48 bool hasUserStencilSettings,
49 GrAppliedClip* out) const {
47 SkASSERT(!fDeviceBounds.isLargest()); 50 SkASSERT(!fDeviceBounds.isLargest());
48 if (fScissorState.enabled()) { 51 if (fScissorState.enabled()) {
49 SkIRect tightScissor; 52 SkIRect tightScissor;
50 if (!tightScissor.intersect(fScissorState.rect(), 53 if (!tightScissor.intersect(fScissorState.rect(),
51 SkIRect::MakeWH(drawContext->width(), drawCo ntext->height()))) { 54 SkIRect::MakeWH(drawContext->width(), drawCo ntext->height()))) {
52 return false; 55 return false;
53 } 56 }
54 if (devBounds && !devBounds->intersects(SkRect::Make(tightScissor))) { 57 if (devBounds && !devBounds->intersects(SkRect::Make(tightScissor))) {
55 return false; 58 return false;
56 } 59 }
(...skipping 26 matching lines...) Expand all
83 } 86 }
84 return; 87 return;
85 } 88 }
86 SkRect devBounds; 89 SkRect devBounds;
87 fStack->getConservativeBounds(-fOrigin.x(), -fOrigin.y(), width, height, &de vBounds, 90 fStack->getConservativeBounds(-fOrigin.x(), -fOrigin.y(), width, height, &de vBounds,
88 isIntersectionOfRects); 91 isIntersectionOfRects);
89 devBounds.roundOut(devResult); 92 devBounds.roundOut(devResult);
90 } 93 }
91 94
92 bool GrClipStackClip::apply(GrContext* context, 95 bool GrClipStackClip::apply(GrContext* context,
93 const GrPipelineBuilder& pipelineBuilder, GrDrawCont ext* drawContext, 96 GrDrawContext* drawContext,
94 const SkRect* devBounds, GrAppliedClip* out) const { 97 const SkRect* devBounds,
95 return GrClipMaskManager::SetupClipping(context, pipelineBuilder, drawContex t, 98 bool useHWAA,
96 *this, devBounds, out); 99 bool hasUserStencilSettings,
100 GrAppliedClip* out) const {
101 return GrClipMaskManager::SetupClipping(context, drawContext, *this, devBoun ds,
102 useHWAA, hasUserStencilSettings, out );
97 } 103 }
OLDNEW
« no previous file with comments | « include/gpu/GrClip.h ('k') | src/gpu/GrClipMaskManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698