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

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

Issue 2164363002: Add SkColorSpace to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove ':' from comment 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 | « src/effects/SkXfermodeImageFilter.cpp ('k') | src/gpu/GrClipMaskManager.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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // render target so default to RGBA_8888 106 // render target so default to RGBA_8888
107 GrPixelConfig config = kRGBA_8888_GrPixelConfig; 107 GrPixelConfig config = kRGBA_8888_GrPixelConfig;
108 if (context->caps()->isConfigRenderable(kAlpha_8_GrPixelConfig, sampleCnt > 0)) { 108 if (context->caps()->isConfigRenderable(kAlpha_8_GrPixelConfig, sampleCnt > 0)) {
109 config = kAlpha_8_GrPixelConfig; 109 config = kAlpha_8_GrPixelConfig;
110 } 110 }
111 111
112 sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kAppr ox, 112 sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kAppr ox,
113 maskRect.width(), 113 maskRect.width(),
114 maskRect.height(), 114 maskRect.height(),
115 config, 115 config,
116 nullptr,
116 sampleCnt)); 117 sampleCnt));
117 if (!drawContext) { 118 if (!drawContext) {
118 return nullptr; 119 return nullptr;
119 } 120 }
120 121
121 drawContext->clear(nullptr, 0x0, true); 122 drawContext->clear(nullptr, 0x0, true);
122 123
123 GrPaint tempPaint; 124 GrPaint tempPaint;
124 tempPaint.setAntiAlias(doAA); 125 tempPaint.setAntiAlias(doAA);
125 tempPaint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op); 126 tempPaint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op);
(...skipping 166 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 | « src/effects/SkXfermodeImageFilter.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698