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

Side by Side Diff: src/effects/SkLightingImageFilter.cpp

Issue 1409753008: Rename non-aa rect methods on GrDrawContext in anticipation of making them support aa (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 1 month 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/SkGpuBlurUtils.cpp ('k') | src/effects/SkMorphologyImageFilter.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 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 GrTexture* src, 346 GrTexture* src,
347 const SkMatrix& matrix, 347 const SkMatrix& matrix,
348 const GrClip& clip, 348 const GrClip& clip,
349 const SkRect& dstRect, 349 const SkRect& dstRect,
350 BoundaryMode boundaryMode, 350 BoundaryMode boundaryMode,
351 const SkIRect& bounds) const { 351 const SkIRect& bounds) const {
352 SkRect srcRect = dstRect.makeOffset(SkIntToScalar(bounds.x()), SkIntToScalar (bounds.y())); 352 SkRect srcRect = dstRect.makeOffset(SkIntToScalar(bounds.x()), SkIntToScalar (bounds.y()));
353 GrPaint paint; 353 GrPaint paint;
354 GrFragmentProcessor* fp = this->getFragmentProcessor(src, matrix, bounds, bo undaryMode); 354 GrFragmentProcessor* fp = this->getFragmentProcessor(src, matrix, bounds, bo undaryMode);
355 paint.addColorFragmentProcessor(fp)->unref(); 355 paint.addColorFragmentProcessor(fp)->unref();
356 drawContext->drawNonAARectToRect(clip, paint, SkMatrix::I(), dstRect, srcRec t); 356 drawContext->fillRectToRect(clip, paint, SkMatrix::I(), dstRect, srcRect);
357 } 357 }
358 358
359 bool SkLightingImageFilterInternal::filterImageGPU(Proxy* proxy, 359 bool SkLightingImageFilterInternal::filterImageGPU(Proxy* proxy,
360 const SkBitmap& src, 360 const SkBitmap& src,
361 const Context& ctx, 361 const Context& ctx,
362 SkBitmap* result, 362 SkBitmap* result,
363 SkIPoint* offset) const { 363 SkIPoint* offset) const {
364 SkBitmap input = src; 364 SkBitmap input = src;
365 SkIPoint srcOffset = SkIPoint::Make(0, 0); 365 SkIPoint srcOffset = SkIPoint::Make(0, 0);
366 if (!this->filterInputGPU(0, proxy, src, ctx, &input, &srcOffset)) { 366 if (!this->filterInputGPU(0, proxy, src, ctx, &input, &srcOffset)) {
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 2013
2014 fsBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight); 2014 fsBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight);
2015 } 2015 }
2016 2016
2017 #endif 2017 #endif
2018 2018
2019 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter) 2019 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter)
2020 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter) 2020 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter)
2021 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter) 2021 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter)
2022 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 2022 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkGpuBlurUtils.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698