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

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

Issue 2182603003: Just pass the draw context to paint conversion (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 4 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
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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 pathIsMutable = true; 280 pathIsMutable = true;
281 path->transform(*prePathMatrix, result); 281 path->transform(*prePathMatrix, result);
282 path = result; 282 path = result;
283 result->setIsVolatile(true); 283 result->setIsVolatile(true);
284 } 284 }
285 } 285 }
286 // at this point we're done with prePathMatrix 286 // at this point we're done with prePathMatrix
287 SkDEBUGCODE(prePathMatrix = (const SkMatrix*)0x50FF8001;) 287 SkDEBUGCODE(prePathMatrix = (const SkMatrix*)0x50FF8001;)
288 288
289 GrPaint grPaint; 289 GrPaint grPaint;
290 if (!SkPaintToGrPaint(context, paint, viewMatrix, drawContext->isGammaCorrec t(), 290 if (!SkPaintToGrPaint(context, drawContext, paint, viewMatrix, &grPaint)) {
291 drawContext->getColorSpace(), &grPaint)) {
292 return; 291 return;
293 } 292 }
294 293
295 if (paint.getMaskFilter()) { 294 if (paint.getMaskFilter()) {
296 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat rix, 295 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat rix,
297 paint.getMaskFilter(), style, 296 paint.getMaskFilter(), style,
298 path, pathIsMutable); 297 path, pathIsMutable);
299 } else { 298 } else {
300 drawContext->drawPath(clip, grPaint, viewMatrix, *path, style); 299 drawContext->drawPath(clip, grPaint, viewMatrix, *path, style);
301 } 300 }
302 } 301 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698