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

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

Issue 2154753003: Introduce GrColorSpaceXform, for gamut conversion on textures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More progress & refactoring Created 4 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/SkGpuBlurUtils.cpp ('k') | src/effects/SkMagnifierImageFilter.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 2012 The Android Open Source Project 2 * Copyright 2012 The Android Open Source Project
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 "SkLightingImageFilter.h" 8 #include "SkLightingImageFilter.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 } 1692 }
1693 1693
1694 }; 1694 };
1695 1695
1696 GrLightingEffect::GrLightingEffect(GrTexture* texture, 1696 GrLightingEffect::GrLightingEffect(GrTexture* texture,
1697 const SkImageFilterLight* light, 1697 const SkImageFilterLight* light,
1698 SkScalar surfaceScale, 1698 SkScalar surfaceScale,
1699 const SkMatrix& matrix, 1699 const SkMatrix& matrix,
1700 BoundaryMode boundaryMode, 1700 BoundaryMode boundaryMode,
1701 const SkIRect* srcBounds) 1701 const SkIRect* srcBounds)
1702 : INHERITED(texture, GrCoordTransform::MakeDivByTextureWHMatrix(texture)) 1702 : INHERITED(texture, nullptr, GrCoordTransform::MakeDivByTextureWHMatrix(tex ture))
1703 , fLight(light) 1703 , fLight(light)
1704 , fSurfaceScale(surfaceScale) 1704 , fSurfaceScale(surfaceScale)
1705 , fFilterMatrix(matrix) 1705 , fFilterMatrix(matrix)
1706 , fBoundaryMode(boundaryMode) 1706 , fBoundaryMode(boundaryMode)
1707 , fDomain(create_domain(texture, srcBounds, GrTextureDomain::kDecal_Mode)) { 1707 , fDomain(create_domain(texture, srcBounds, GrTextureDomain::kDecal_Mode)) {
1708 fLight->ref(); 1708 fLight->ref();
1709 if (light->requiresFragmentPosition()) { 1709 if (light->requiresFragmentPosition()) {
1710 this->setWillReadFragmentPosition(); 1710 this->setWillReadFragmentPosition();
1711 } 1711 }
1712 } 1712 }
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
2168 2168
2169 fragBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight); 2169 fragBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight);
2170 } 2170 }
2171 2171
2172 #endif 2172 #endif
2173 2173
2174 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter) 2174 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter)
2175 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter) 2175 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter)
2176 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter) 2176 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter)
2177 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 2177 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkGpuBlurUtils.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698