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

Side by Side Diff: src/image/SkImageShader.cpp

Issue 1397123002: Move functions from SkGr to SkGrPriv.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 9th time's a charm? Created 5 years, 2 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/gpu/effects/GrXfermodeFragmentProcessor.cpp ('k') | src/image/SkImage_Gpu.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 2015 Google Inc. 2 * Copyright 2015 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 "SkBitmapProcShader.h" 8 #include "SkBitmapProcShader.h"
9 #include "SkBitmapProvider.h" 9 #include "SkBitmapProvider.h"
10 #include "SkImage_Base.h" 10 #include "SkImage_Base.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 str->append(")"); 71 str->append(")");
72 } 72 }
73 #endif 73 #endif
74 74
75 //////////////////////////////////////////////////////////////////////////////// /////////////////// 75 //////////////////////////////////////////////////////////////////////////////// ///////////////////
76 76
77 #if SK_SUPPORT_GPU 77 #if SK_SUPPORT_GPU
78 78
79 #include "GrTextureAccess.h" 79 #include "GrTextureAccess.h"
80 #include "SkGr.h" 80 #include "SkGr.h"
81 #include "SkGrPriv.h"
81 #include "effects/GrSimpleTextureEffect.h" 82 #include "effects/GrSimpleTextureEffect.h"
82 #include "effects/GrBicubicEffect.h" 83 #include "effects/GrBicubicEffect.h"
83 #include "effects/GrSimpleTextureEffect.h" 84 #include "effects/GrSimpleTextureEffect.h"
84 85
85 const GrFragmentProcessor* SkImageShader::asFragmentProcessor(GrContext* context , 86 const GrFragmentProcessor* SkImageShader::asFragmentProcessor(GrContext* context ,
86 const SkMatrix& vi ewM, 87 const SkMatrix& vi ewM,
87 const SkMatrix* lo calMatrix, 88 const SkMatrix* lo calMatrix,
88 SkFilterQuality fi lterQuality) const { 89 SkFilterQuality fi lterQuality) const {
89 SkMatrix matrix; 90 SkMatrix matrix;
90 matrix.setIDiv(fImage->width(), fImage->height()); 91 matrix.setIDiv(fImage->width(), fImage->height());
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 inner.reset(GrSimpleTextureEffect::Create(texture, matrix, params)); 135 inner.reset(GrSimpleTextureEffect::Create(texture, matrix, params));
135 } 136 }
136 137
137 if (GrPixelConfigIsAlphaOnly(texture->config())) { 138 if (GrPixelConfigIsAlphaOnly(texture->config())) {
138 return SkRef(inner.get()); 139 return SkRef(inner.get());
139 } 140 }
140 return GrFragmentProcessor::MulOutputByInputAlpha(inner); 141 return GrFragmentProcessor::MulOutputByInputAlpha(inner);
141 } 142 }
142 143
143 #endif 144 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrXfermodeFragmentProcessor.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698