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

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

Issue 1246193002: Moved GrGLFragmentProcessor definition to its own file (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 5 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"
11 #include "SkUnPreMultiply.h" 11 #include "SkUnPreMultiply.h"
12 #include "SkColorPriv.h" 12 #include "SkColorPriv.h"
13 #if SK_SUPPORT_GPU 13 #if SK_SUPPORT_GPU
14 #include "GrContext.h" 14 #include "GrContext.h"
15 #include "GrDrawContext.h" 15 #include "GrDrawContext.h"
16 #include "GrCoordTransform.h" 16 #include "GrCoordTransform.h"
17 #include "GrInvariantOutput.h" 17 #include "GrInvariantOutput.h"
18 #include "effects/GrTextureDomain.h" 18 #include "effects/GrTextureDomain.h"
19 #include "gl/GrGLProcessor.h" 19 #include "gl/GrGLFragmentProcessor.h"
20 #include "gl/builders/GrGLProgramBuilder.h" 20 #include "gl/builders/GrGLProgramBuilder.h"
21 #endif 21 #endif
22 22
23 namespace { 23 namespace {
24 24
25 #define kChannelSelectorKeyBits 3; // Max value is 4, so 3 bits are required at most 25 #define kChannelSelectorKeyBits 3; // Max value is 4, so 3 bits are required at most
26 26
27 template<SkDisplacementMapEffect::ChannelSelectorType type> 27 template<SkDisplacementMapEffect::ChannelSelectorType type>
28 uint32_t getValue(SkColor, const SkUnPreMultiply::Scale*) { 28 uint32_t getValue(SkColor, const SkUnPreMultiply::Scale*) {
29 SkDEBUGFAIL("Unknown channel selector"); 29 SkDEBUGFAIL("Unknown channel selector");
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 const GrGLSLCaps&, GrProcessorKeyBuilder* b) { 647 const GrGLSLCaps&, GrProcessorKeyBuilder* b) {
648 const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMap Effect>(); 648 const GrDisplacementMapEffect& displacementMap = proc.cast<GrDisplacementMap Effect>();
649 649
650 uint32_t xKey = displacementMap.xChannelSelector(); 650 uint32_t xKey = displacementMap.xChannelSelector();
651 uint32_t yKey = displacementMap.yChannelSelector() << kChannelSelectorKeyBit s; 651 uint32_t yKey = displacementMap.yChannelSelector() << kChannelSelectorKeyBit s;
652 652
653 b->add32(xKey | yKey); 653 b->add32(xKey | yKey);
654 } 654 }
655 #endif 655 #endif
656 656
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