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

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

Issue 1443743002: Rename some processor functions from GL to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@primProcs
Patch Set: nits 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/SkColorMatrixFilter.cpp ('k') | src/effects/SkLightingImageFilter.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 "SkDevice.h" 9 #include "SkDevice.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 SkDisplacementMapEffect::ChannelSelectorType xChannelSelector() const 345 SkDisplacementMapEffect::ChannelSelectorType xChannelSelector() const
346 { return fXChannelSelector; } 346 { return fXChannelSelector; }
347 SkDisplacementMapEffect::ChannelSelectorType yChannelSelector() const 347 SkDisplacementMapEffect::ChannelSelectorType yChannelSelector() const
348 { return fYChannelSelector; } 348 { return fYChannelSelector; }
349 const SkVector& scale() const { return fScale; } 349 const SkVector& scale() const { return fScale; }
350 350
351 const char* name() const override { return "DisplacementMap"; } 351 const char* name() const override { return "DisplacementMap"; }
352 const GrTextureDomain& domain() const { return fDomain; } 352 const GrTextureDomain& domain() const { return fDomain; }
353 353
354 private: 354 private:
355 GrGLSLFragmentProcessor* onCreateGLInstance() const override { 355 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
356 return new GrGLDisplacementMapEffect(*this); 356 return new GrGLDisplacementMapEffect(*this);
357 } 357 }
358 358
359 virtual void onGetGLProcessorKey(const GrGLSLCaps& caps, 359 virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
360 GrProcessorKeyBuilder* b) const override { 360 GrProcessorKeyBuilder* b) const override {
361 GrGLDisplacementMapEffect::GenKey(*this, caps, b); 361 GrGLDisplacementMapEffect::GenKey(*this, caps, b);
362 } 362 }
363 363
364 bool onIsEqual(const GrFragmentProcessor&) const override; 364 bool onIsEqual(const GrFragmentProcessor&) const override;
365 365
366 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; 366 void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
367 367
368 GrDisplacementMapEffect(SkDisplacementMapEffect::ChannelSelectorType xChanne lSelector, 368 GrDisplacementMapEffect(SkDisplacementMapEffect::ChannelSelectorType xChanne lSelector,
369 SkDisplacementMapEffect::ChannelSelectorType yChanne lSelector, 369 SkDisplacementMapEffect::ChannelSelectorType yChanne lSelector,
370 const SkVector& scale, 370 const SkVector& scale,
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 const GrGLSLCaps&, GrProcessorKeyBuilder* b) { 628 const GrGLSLCaps&, GrProcessorKeyBuilder* b) {
629 const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMap Effect>(); 629 const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMap Effect>();
630 630
631 uint32_t xKey = displacementMap.xChannelSelector(); 631 uint32_t xKey = displacementMap.xChannelSelector();
632 uint32_t yKey = displacementMap.yChannelSelector() << kChannelSelectorKeyBit s; 632 uint32_t yKey = displacementMap.yChannelSelector() << kChannelSelectorKeyBit s;
633 633
634 b->add32(xKey | yKey); 634 b->add32(xKey | yKey);
635 } 635 }
636 #endif 636 #endif
637 637
OLDNEW
« no previous file with comments | « src/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkLightingImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698