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

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

Issue 1307223004: Remove GrStagedProcessor, remove the word Stage as it applies to FPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix misresolve 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/SkBlurMaskFilter.cpp ('k') | src/effects/SkGpuBlurUtils.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 2013 Google Inc. 2 * Copyright 2013 Google Inc.
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 "SkDisplacementMapEffect.h" 8 #include "SkDisplacementMapEffect.h"
9 #include "SkReadBuffer.h" 9 #include "SkReadBuffer.h"
10 #include "SkWriteBuffer.h" 10 #include "SkWriteBuffer.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 } 431 }
432 432
433 SkVector scale = SkVector::Make(fScale, fScale); 433 SkVector scale = SkVector::Make(fScale, fScale);
434 ctx.ctm().mapVectors(&scale, 1); 434 ctx.ctm().mapVectors(&scale, 1);
435 435
436 GrPaint paint; 436 GrPaint paint;
437 SkMatrix offsetMatrix = GrCoordTransform::MakeDivByTextureWHMatrix(displacem ent); 437 SkMatrix offsetMatrix = GrCoordTransform::MakeDivByTextureWHMatrix(displacem ent);
438 offsetMatrix.preTranslate(SkIntToScalar(colorOffset.fX - displacementOffset. fX), 438 offsetMatrix.preTranslate(SkIntToScalar(colorOffset.fX - displacementOffset. fX),
439 SkIntToScalar(colorOffset.fY - displacementOffset. fY)); 439 SkIntToScalar(colorOffset.fY - displacementOffset. fY));
440 440
441 paint.addColorProcessor( 441 paint.addColorFragmentProcessor(
442 GrDisplacementMapEffect::Create(paint.getProcessorDataManager(), 442 GrDisplacementMapEffect::Create(paint.getProcessorDataManager(),
443 fXChannelSelector, 443 fXChannelSelector,
444 fYChannelSelector, 444 fYChannelSelector,
445 scale, 445 scale,
446 displacement, 446 displacement,
447 offsetMatrix, 447 offsetMatrix,
448 color, 448 color,
449 colorBM.dimensions()))->unref(); 449 colorBM.dimensions()))->unref();
450 SkIRect colorBounds = bounds; 450 SkIRect colorBounds = bounds;
451 colorBounds.offset(-colorOffset); 451 colorBounds.offset(-colorOffset);
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 const GrGLSLCaps&, GrProcessorKeyBuilder* b) { 633 const GrGLSLCaps&, GrProcessorKeyBuilder* b) {
634 const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMap Effect>(); 634 const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMap Effect>();
635 635
636 uint32_t xKey = displacementMap.xChannelSelector(); 636 uint32_t xKey = displacementMap.xChannelSelector();
637 uint32_t yKey = displacementMap.yChannelSelector() << kChannelSelectorKeyBit s; 637 uint32_t yKey = displacementMap.yChannelSelector() << kChannelSelectorKeyBit s;
638 638
639 b->add32(xKey | yKey); 639 b->add32(xKey | yKey);
640 } 640 }
641 #endif 641 #endif
642 642
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698