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

Side by Side Diff: src/effects/SkXfermodeImageFilter.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 2013 The Android Open Source Project 2 * Copyright 2013 The Android Open Source Project
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 "SkXfermodeImageFilter.h" 8 #include "SkXfermodeImageFilter.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkDevice.h" 10 #include "SkDevice.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 GrTextureDomain::MakeTexelDomain(foregroundTex, foreground.bounds()), 186 GrTextureDomain::MakeTexelDomain(foregroundTex, foreground.bounds()),
187 GrTextureDomain::kDecal_Mode, 187 GrTextureDomain::kDecal_Mode,
188 GrTextureParams::kNone_FilterMode) 188 GrTextureParams::kNone_FilterMode)
189 ); 189 );
190 190
191 paint.addColorFragmentProcessor(foregroundDomain.get()); 191 paint.addColorFragmentProcessor(foregroundDomain.get());
192 if (xferFP) { 192 if (xferFP) {
193 paint.addColorFragmentProcessor(xferFP)->unref(); 193 paint.addColorFragmentProcessor(xferFP)->unref();
194 } 194 }
195 195
196 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(dst->asRenderTa rget())); 196 SkAutoTUnref<GrDrawContext> drawContext(
197 context->drawingMgr().drawContext(dst->a sRenderTarget()));
197 if (!drawContext) { 198 if (!drawContext) {
198 return false; 199 return false;
199 } 200 }
200 201
201 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), srcRect); 202 drawContext->drawRect(GrClip::WideOpen(), paint, SkMatrix::I(), srcRect);
202 203
203 offset->fX = backgroundOffset.fX; 204 offset->fX = backgroundOffset.fX;
204 offset->fY = backgroundOffset.fY; 205 offset->fY = backgroundOffset.fY;
205 WrapTexture(dst, src.width(), src.height(), result); 206 WrapTexture(dst, src.width(), src.height(), result);
206 return true; 207 return true;
207 } 208 }
208 209
209 #endif 210 #endif
210 211
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698