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

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

Issue 1306803003: Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 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
« 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 GrTexture* dst, 347 GrTexture* dst,
348 const SkMatrix& matrix, 348 const SkMatrix& matrix,
349 const GrClip& clip, 349 const GrClip& clip,
350 const SkRect& dstRect, 350 const SkRect& dstRect,
351 BoundaryMode boundaryMode, 351 BoundaryMode boundaryMode,
352 const SkIRect& bounds) const { 352 const SkIRect& bounds) const {
353 SkRect srcRect = dstRect.makeOffset(SkIntToScalar(bounds.x()), SkIntToScalar (bounds.y())); 353 SkRect srcRect = dstRect.makeOffset(SkIntToScalar(bounds.x()), SkIntToScalar (bounds.y()));
354 GrPaint paint; 354 GrPaint paint;
355 GrFragmentProcessor* fp = this->getFragmentProcessor(paint.getProcessorDataM anager(), src, 355 GrFragmentProcessor* fp = this->getFragmentProcessor(paint.getProcessorDataM anager(), src,
356 matrix, bounds, boundar yMode); 356 matrix, bounds, boundar yMode);
357 paint.addColorFragmentProcessor(fp)->unref(); 357 paint.addColorProcessor(fp)->unref();
358 drawContext->drawNonAARectToRect(dst->asRenderTarget(), clip, paint, SkMatri x::I(), 358 drawContext->drawNonAARectToRect(dst->asRenderTarget(), clip, paint, SkMatri x::I(),
359 dstRect, srcRect); 359 dstRect, srcRect);
360 } 360 }
361 361
362 bool SkLightingImageFilterInternal::filterImageGPU(Proxy* proxy, 362 bool SkLightingImageFilterInternal::filterImageGPU(Proxy* proxy,
363 const SkBitmap& src, 363 const SkBitmap& src,
364 const Context& ctx, 364 const Context& ctx,
365 SkBitmap* result, 365 SkBitmap* result,
366 SkIPoint* offset) const { 366 SkIPoint* offset) const {
367 SkBitmap input = src; 367 SkBitmap input = src;
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2035 2035
2036 fsBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight); 2036 fsBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight);
2037 } 2037 }
2038 2038
2039 #endif 2039 #endif
2040 2040
2041 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter) 2041 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter)
2042 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter) 2042 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter)
2043 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter) 2043 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter)
2044 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 2044 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