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

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

Issue 1486923004: Retract GrRenderTarget a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years 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 | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrTextContext.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrSoftwarePathRenderer.h" 9 #include "GrSoftwarePathRenderer.h"
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 21 matching lines...) Expand all
32 const SkPath& path, 32 const SkPath& path,
33 const SkMatrix& matrix, 33 const SkMatrix& matrix,
34 SkIRect* devPathBounds, 34 SkIRect* devPathBounds,
35 SkIRect* devClipBounds) { 35 SkIRect* devClipBounds) {
36 // compute bounds as intersection of rt size, clip, and path 36 // compute bounds as intersection of rt size, clip, and path
37 const GrRenderTarget* rt = pipelineBuilder->getRenderTarget(); 37 const GrRenderTarget* rt = pipelineBuilder->getRenderTarget();
38 if (nullptr == rt) { 38 if (nullptr == rt) {
39 return false; 39 return false;
40 } 40 }
41 41
42 pipelineBuilder->clip().getConservativeBounds(rt, devClipBounds); 42 pipelineBuilder->clip().getConservativeBounds(rt->width(), rt->height(), dev ClipBounds);
43 43
44 if (devClipBounds->isEmpty()) { 44 if (devClipBounds->isEmpty()) {
45 *devPathBounds = SkIRect::MakeWH(rt->width(), rt->height()); 45 *devPathBounds = SkIRect::MakeWH(rt->width(), rt->height());
46 return false; 46 return false;
47 } 47 }
48 48
49 if (!path.getBounds().isEmpty()) { 49 if (!path.getBounds().isEmpty()) {
50 SkRect pathSBounds; 50 SkRect pathSBounds;
51 matrix.mapRect(&pathSBounds, path.getBounds()); 51 matrix.mapRect(&pathSBounds, path.getBounds());
52 SkIRect pathIBounds; 52 SkIRect pathIBounds;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 GrSWMaskHelper::DrawToTargetWithPathMask(texture, args.fTarget, args.fPipeli neBuilder, 129 GrSWMaskHelper::DrawToTargetWithPathMask(texture, args.fTarget, args.fPipeli neBuilder,
130 args.fColor, *args.fViewMatrix, dev PathBounds); 130 args.fColor, *args.fViewMatrix, dev PathBounds);
131 131
132 if (args.fPath->isInverseFillType()) { 132 if (args.fPath->isInverseFillType()) {
133 draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor, * args.fViewMatrix, 133 draw_around_inv_path(args.fTarget, args.fPipelineBuilder, args.fColor, * args.fViewMatrix,
134 devClipBounds, devPathBounds); 134 devClipBounds, devPathBounds);
135 } 135 }
136 136
137 return true; 137 return true;
138 } 138 }
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | src/gpu/GrTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698