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

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

Issue 1413673002: Remove DrawingMgr shims from GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove abandon, reset & flush from public DrawingMgr API Created 5 years, 2 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 desc.fConfig = kAlpha_8_GrPixelConfig; 117 desc.fConfig = kAlpha_8_GrPixelConfig;
118 } 118 }
119 119
120 GrTexture* mask = context->textureProvider()->createApproxTexture(desc); 120 GrTexture* mask = context->textureProvider()->createApproxTexture(desc);
121 if (nullptr == mask) { 121 if (nullptr == mask) {
122 return nullptr; 122 return nullptr;
123 } 123 }
124 124
125 SkRect clipRect = SkRect::MakeWH(maskRect->width(), maskRect->height()); 125 SkRect clipRect = SkRect::MakeWH(maskRect->width(), maskRect->height());
126 126
127 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(mask->asRenderT arget())); 127 SkAutoTUnref<GrDrawContext> drawContext(
128 context->drawingMgr().drawContext(mask->as RenderTarget()));
128 if (!drawContext) { 129 if (!drawContext) {
129 return nullptr; 130 return nullptr;
130 } 131 }
131 132
132 drawContext->clear(nullptr, 0x0, true); 133 drawContext->clear(nullptr, 0x0, true);
133 134
134 GrPaint tempPaint; 135 GrPaint tempPaint;
135 tempPaint.setAntiAlias(doAA); 136 tempPaint.setAntiAlias(doAA);
136 tempPaint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op); 137 tempPaint.setCoverageSetOpXPFactory(SkRegion::kReplace_Op);
137 138
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 SkPaint::kFill_Sty le; 288 SkPaint::kFill_Sty le;
288 draw_with_mask_filter(drawContext, context->textureProvider(), 289 draw_with_mask_filter(drawContext, context->textureProvider(),
289 clip, viewMatrix, *devPathPtr, 290 clip, viewMatrix, *devPathPtr,
290 paint.getMaskFilter(), clipBounds, &grPaint, style ); 291 paint.getMaskFilter(), clipBounds, &grPaint, style );
291 return; 292 return;
292 } 293 }
293 294
294 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo); 295 drawContext->drawPath(clip, grPaint, viewMatrix, *pathPtr, strokeInfo);
295 } 296 }
296 297
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698