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

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

Issue 2138083002: skip call to clip::apply when clip is wide open Base URL: https://chromium.googlesource.com/skia.git@llist
Patch Set: rm gcmm 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/GrDrawContext.h ('k') | src/gpu/GrClip.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 2015 Google Inc. 2 * Copyright 2015 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 "GrBlurUtils.h" 8 #include "GrBlurUtils.h"
9 #include "GrDrawContext.h" 9 #include "GrDrawContext.h"
10 #include "GrCaps.h" 10 #include "GrCaps.h"
11 #include "GrContext.h" 11 #include "GrContext.h"
12 #include "effects/GrSimpleTextureEffect.h" 12 #include "effects/GrSimpleTextureEffect.h"
13 #include "GrStyle.h" 13 #include "GrStyle.h"
14 #include "GrTexture.h" 14 #include "GrTexture.h"
15 #include "GrTextureProvider.h" 15 #include "GrTextureProvider.h"
16 #include "SkDraw.h" 16 #include "SkDraw.h"
17 #include "SkGrPriv.h" 17 #include "SkGrPriv.h"
18 #include "SkMaskFilter.h" 18 #include "SkMaskFilter.h"
19 #include "SkPaint.h" 19 #include "SkPaint.h"
20 #include "SkTLazy.h"
20 21
21 static bool clip_bounds_quick_reject(const SkIRect& clipBounds, const SkIRect& r ect) { 22 static bool clip_bounds_quick_reject(const SkIRect& clipBounds, const SkIRect& r ect) {
22 return clipBounds.isEmpty() || rect.isEmpty() || !SkIRect::Intersects(clipBo unds, rect); 23 return clipBounds.isEmpty() || rect.isEmpty() || !SkIRect::Intersects(clipBo unds, rect);
23 } 24 }
24 25
25 // Draw a mask using the supplied paint. Since the coverage/geometry 26 // Draw a mask using the supplied paint. Since the coverage/geometry
26 // is already burnt into the mask this boils down to a rect draw. 27 // is already burnt into the mask this boils down to a rect draw.
27 // Return true if the mask was successfully drawn. 28 // Return true if the mask was successfully drawn.
28 static bool draw_mask(GrDrawContext* drawContext, 29 static bool draw_mask(GrDrawContext* drawContext,
29 const GrClip& clip, 30 const GrClip& clip,
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 293 }
293 294
294 if (paint.getMaskFilter()) { 295 if (paint.getMaskFilter()) {
295 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat rix, 296 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat rix,
296 paint.getMaskFilter(), style, 297 paint.getMaskFilter(), style,
297 path, pathIsMutable); 298 path, pathIsMutable);
298 } else { 299 } else {
299 drawContext->drawPath(clip, grPaint, viewMatrix, *path, style); 300 drawContext->drawPath(clip, grPaint, viewMatrix, *path, style);
300 } 301 }
301 } 302 }
OLDNEW
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698