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

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

Issue 1409753008: Rename non-aa rect methods on GrDrawContext in anticipation of making them support aa (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 1 month 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/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/GrDrawContext.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"
(...skipping 24 matching lines...) Expand all
35 matrix.setTranslate(-maskRect.fLeft, -maskRect.fTop); 35 matrix.setTranslate(-maskRect.fLeft, -maskRect.fTop);
36 matrix.postIDiv(mask->width(), mask->height()); 36 matrix.postIDiv(mask->width(), mask->height());
37 37
38 grp->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(mask, matrix , 38 grp->addCoverageFragmentProcessor(GrSimpleTextureEffect::Create(mask, matrix ,
39 kDevice_GrCo ordSet))->unref(); 39 kDevice_GrCo ordSet))->unref();
40 40
41 SkMatrix inverse; 41 SkMatrix inverse;
42 if (!viewMatrix.invert(&inverse)) { 42 if (!viewMatrix.invert(&inverse)) {
43 return false; 43 return false;
44 } 44 }
45 drawContext->drawNonAARectWithLocalMatrix(clip, *grp, SkMatrix::I(), maskRec t, inverse); 45 drawContext->fillRectWithLocalMatrix(clip, *grp, SkMatrix::I(), maskRect, in verse);
46 return true; 46 return true;
47 } 47 }
48 48
49 static bool draw_with_mask_filter(GrDrawContext* drawContext, 49 static bool draw_with_mask_filter(GrDrawContext* drawContext,
50 GrTextureProvider* textureProvider, 50 GrTextureProvider* textureProvider,
51 const GrClip& clipData, 51 const GrClip& clipData,
52 const SkMatrix& viewMatrix, 52 const SkMatrix& viewMatrix,
53 const SkPath& devPath, 53 const SkPath& devPath,
54 SkMaskFilter* filter, 54 SkMaskFilter* filter,
55 const SkIRect& clipBounds, 55 const SkIRect& clipBounds,
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 SkPaint::kFill_Sty le; 287 SkPaint::kFill_Sty le;
288 draw_with_mask_filter(drawContext, context->textureProvider(), 288 draw_with_mask_filter(drawContext, context->textureProvider(),
289 clip, viewMatrix, *devPathPtr, 289 clip, viewMatrix, *devPathPtr,
290 paint.getMaskFilter(), clipBounds, &grPaint, style ); 290 paint.getMaskFilter(), clipBounds, &grPaint, style );
291 return; 291 return;
292 } 292 }
293 293
294 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo); 294 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo);
295 } 295 }
296 296
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/gpu/GrDrawContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698