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

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

Issue 1133123009: rename GrDrawTargetCaps to GrCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix gypi filename Created 5 years, 7 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/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 "SkReadBuffer.h" 9 #include "SkReadBuffer.h"
10 #include "SkWriteBuffer.h" 10 #include "SkWriteBuffer.h"
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 // not of constant color when a displacement effect is applied. 510 // not of constant color when a displacement effect is applied.
511 inout->setToUnknown(GrInvariantOutput::kWillNot_ReadInput); 511 inout->setToUnknown(GrInvariantOutput::kWillNot_ReadInput);
512 } 512 }
513 513
514 /////////////////////////////////////////////////////////////////////////////// 514 ///////////////////////////////////////////////////////////////////////////////
515 515
516 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDisplacementMapEffect); 516 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDisplacementMapEffect);
517 517
518 GrFragmentProcessor* GrDisplacementMapEffect::TestCreate(SkRandom* random, 518 GrFragmentProcessor* GrDisplacementMapEffect::TestCreate(SkRandom* random,
519 GrContext*, 519 GrContext*,
520 const GrDrawTargetCaps&, 520 const GrCaps&,
521 GrTexture* textures[]) { 521 GrTexture* textures[]) {
522 int texIdxDispl = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureId x : 522 int texIdxDispl = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureId x :
523 GrProcessorUnitTest::kAlphaTextureIdx ; 523 GrProcessorUnitTest::kAlphaTextureIdx ;
524 int texIdxColor = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureId x : 524 int texIdxColor = random->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureId x :
525 GrProcessorUnitTest::kAlphaTextureIdx ; 525 GrProcessorUnitTest::kAlphaTextureIdx ;
526 static const int kMaxComponent = 4; 526 static const int kMaxComponent = 4;
527 SkDisplacementMapEffect::ChannelSelectorType xChannelSelector = 527 SkDisplacementMapEffect::ChannelSelectorType xChannelSelector =
528 static_cast<SkDisplacementMapEffect::ChannelSelectorType>( 528 static_cast<SkDisplacementMapEffect::ChannelSelectorType>(
529 random->nextRangeU(1, kMaxComponent)); 529 random->nextRangeU(1, kMaxComponent));
530 SkDisplacementMapEffect::ChannelSelectorType yChannelSelector = 530 SkDisplacementMapEffect::ChannelSelectorType yChannelSelector =
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 const GrGLSLCaps&, GrProcessorKeyBuilder* b) { 637 const GrGLSLCaps&, GrProcessorKeyBuilder* b) {
638 const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMap Effect>(); 638 const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMap Effect>();
639 639
640 uint32_t xKey = displacementMap.xChannelSelector(); 640 uint32_t xKey = displacementMap.xChannelSelector();
641 uint32_t yKey = displacementMap.yChannelSelector() << kChannelSelectorKeyBit s; 641 uint32_t yKey = displacementMap.yChannelSelector() << kChannelSelectorKeyBit s;
642 642
643 b->add32(xKey | yKey); 643 b->add32(xKey | yKey);
644 } 644 }
645 #endif 645 #endif
646 646
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