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

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

Issue 1937553002: Add Gr*Proxy classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix memory bugs Created 4 years, 7 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/GrContext.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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 sampleCnt = 0; 109 sampleCnt = 0;
110 } 110 }
111 111
112 // We actually only need A8, but it often isn't supported as a 112 // We actually only need A8, but it often isn't supported as a
113 // render target so default to RGBA_8888 113 // render target so default to RGBA_8888
114 GrPixelConfig config = kRGBA_8888_GrPixelConfig; 114 GrPixelConfig config = kRGBA_8888_GrPixelConfig;
115 if (context->caps()->isConfigRenderable(kAlpha_8_GrPixelConfig, sampleCnt > 0)) { 115 if (context->caps()->isConfigRenderable(kAlpha_8_GrPixelConfig, sampleCnt > 0)) {
116 config = kAlpha_8_GrPixelConfig; 116 config = kAlpha_8_GrPixelConfig;
117 } 117 }
118 118
119 sk_sp<GrDrawContext> drawContext(context->newDrawContext(GrContext::kLoose_B ackingFit, 119 sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kAppr ox,
120 SkScalarCeilToInt(m askRect->width()), 120 SkScalarCeilToInt(m askRect->width()),
121 SkScalarCeilToInt(m askRect->height()), 121 SkScalarCeilToInt(m askRect->height()),
122 config, 122 config,
123 sampleCnt)); 123 sampleCnt));
124 if (!drawContext) { 124 if (!drawContext) {
125 return nullptr; 125 return nullptr;
126 } 126 }
127 127
128 drawContext->clear(nullptr, 0x0, true); 128 drawContext->clear(nullptr, 0x0, true);
129 129
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 } 338 }
339 339
340 if (paint.getMaskFilter()) { 340 if (paint.getMaskFilter()) {
341 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat rix, 341 draw_path_with_mask_filter(context, drawContext, clip, &grPaint, viewMat rix,
342 paint.getMaskFilter(), pathEffect, strokeInfo , 342 paint.getMaskFilter(), pathEffect, strokeInfo ,
343 pathPtr, pathIsMutable); 343 pathPtr, pathIsMutable);
344 } else { 344 } else {
345 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo); 345 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo);
346 } 346 }
347 } 347 }
OLDNEW
« no previous file with comments | « src/effects/SkXfermodeImageFilter.cpp ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698