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

Side by Side Diff: src/effects/SkLightingImageFilter.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 2012 The Android Open Source Project 2 * Copyright 2012 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 "SkLightingImageFilter.h" 8 #include "SkLightingImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 SkRect topLeft = SkRect::MakeXYWH(0, 0, 1, 1); 396 SkRect topLeft = SkRect::MakeXYWH(0, 0, 1, 1);
397 SkRect top = SkRect::MakeXYWH(1, 0, dstRect.width() - 2, 1); 397 SkRect top = SkRect::MakeXYWH(1, 0, dstRect.width() - 2, 1);
398 SkRect topRight = SkRect::MakeXYWH(dstRect.width() - 1, 0, 1, 1); 398 SkRect topRight = SkRect::MakeXYWH(dstRect.width() - 1, 0, 1, 1);
399 SkRect left = SkRect::MakeXYWH(0, 1, 1, dstRect.height() - 2); 399 SkRect left = SkRect::MakeXYWH(0, 1, 1, dstRect.height() - 2);
400 SkRect interior = dstRect.makeInset(1, 1); 400 SkRect interior = dstRect.makeInset(1, 1);
401 SkRect right = SkRect::MakeXYWH(dstRect.width() - 1, 1, 1, dstRect.height() - 2); 401 SkRect right = SkRect::MakeXYWH(dstRect.width() - 1, 1, 1, dstRect.height() - 2);
402 SkRect bottomLeft = SkRect::MakeXYWH(0, dstRect.height() - 1, 1, 1); 402 SkRect bottomLeft = SkRect::MakeXYWH(0, dstRect.height() - 1, 1, 1);
403 SkRect bottom = SkRect::MakeXYWH(1, dstRect.height() - 1, dstRect.width() - 2, 1); 403 SkRect bottom = SkRect::MakeXYWH(1, dstRect.height() - 1, dstRect.width() - 2, 1);
404 SkRect bottomRight = SkRect::MakeXYWH(dstRect.width() - 1, dstRect.height() - 1, 1, 1); 404 SkRect bottomRight = SkRect::MakeXYWH(dstRect.width() - 1, dstRect.height() - 1, 1, 1);
405 405
406 SkAutoTUnref<GrDrawContext> drawContext(context->drawContext(dst->asRenderTa rget())); 406 SkAutoTUnref<GrDrawContext> drawContext(
407 context->drawingMgr().drawContext(dst->a sRenderTarget()));
407 if (!drawContext) { 408 if (!drawContext) {
408 return false; 409 return false;
409 } 410 }
410 411
411 this->drawRect(drawContext, srcTexture, matrix, clip, topLeft, kTopLeft_Boun daryMode, bounds); 412 this->drawRect(drawContext, srcTexture, matrix, clip, topLeft, kTopLeft_Boun daryMode, bounds);
412 this->drawRect(drawContext, srcTexture, matrix, clip, top, kTop_BoundaryMode , bounds); 413 this->drawRect(drawContext, srcTexture, matrix, clip, top, kTop_BoundaryMode , bounds);
413 this->drawRect(drawContext, srcTexture, matrix, clip, topRight, kTopRight_Bo undaryMode, 414 this->drawRect(drawContext, srcTexture, matrix, clip, topRight, kTopRight_Bo undaryMode,
414 bounds); 415 bounds);
415 this->drawRect(drawContext, srcTexture, matrix, clip, left, kLeft_BoundaryMo de, bounds); 416 this->drawRect(drawContext, srcTexture, matrix, clip, left, kLeft_BoundaryMo de, bounds);
416 this->drawRect(drawContext, srcTexture, matrix, clip, interior, kInterior_Bo undaryMode, 417 this->drawRect(drawContext, srcTexture, matrix, clip, interior, kInterior_Bo undaryMode,
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
2005 2006
2006 fsBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight); 2007 fsBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight);
2007 } 2008 }
2008 2009
2009 #endif 2010 #endif
2010 2011
2011 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter) 2012 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter)
2012 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter) 2013 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter)
2013 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter) 2014 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter)
2014 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 2015 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698