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

Side by Side Diff: src/effects/SkBlurMaskFilter.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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 } else if (kSolid_SkBlurStyle == fBlurStyle) { 1211 } else if (kSolid_SkBlurStyle == fBlurStyle) {
1212 // solid: dst = src + dst - src * dst 1212 // solid: dst = src + dst - src * dst
1213 // = src + (1 - src) * dst 1213 // = src + (1 - src) * dst
1214 paint.setCoverageSetOpXPFactory(SkRegion::kUnion_Op); 1214 paint.setCoverageSetOpXPFactory(SkRegion::kUnion_Op);
1215 } else if (kOuter_SkBlurStyle == fBlurStyle) { 1215 } else if (kOuter_SkBlurStyle == fBlurStyle) {
1216 // outer: dst = dst * (1 - src) 1216 // outer: dst = dst * (1 - src)
1217 // = 0 * src + (1 - src) * dst 1217 // = 0 * src + (1 - src) * dst
1218 paint.setCoverageSetOpXPFactory(SkRegion::kDifference_Op); 1218 paint.setCoverageSetOpXPFactory(SkRegion::kDifference_Op);
1219 } 1219 }
1220 1220
1221 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext((*result)-> asRenderTarget())); 1221 SkAutoTUnref<GrDrawContext> drawContext(
1222 context->drawingMgr().drawContext((*result)->asR enderTarget()));
1222 if (!drawContext) { 1223 if (!drawContext) {
1223 return false; 1224 return false;
1224 } 1225 }
1225 1226
1226 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), clipRect ); 1227 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), clipRect );
1227 } 1228 }
1228 1229
1229 return true; 1230 return true;
1230 } 1231 }
1231 1232
(...skipping 25 matching lines...) Expand all
1257 } else { 1258 } else {
1258 str->append("None"); 1259 str->append("None");
1259 } 1260 }
1260 str->append("))"); 1261 str->append("))");
1261 } 1262 }
1262 #endif 1263 #endif
1263 1264
1264 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1265 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1265 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1266 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1266 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1267 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698