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

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

Issue 1873063002: Fix roll bot's win gn build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « include/effects/SkLightingImageFilter.h ('k') | no next file » | 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 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 /////////////////////////////////////////////////////////////////////////////// 1103 ///////////////////////////////////////////////////////////////////////////////
1104 1104
1105 SkLightingImageFilter::SkLightingImageFilter(sk_sp<SkImageFilterLight> light, 1105 SkLightingImageFilter::SkLightingImageFilter(sk_sp<SkImageFilterLight> light,
1106 SkScalar surfaceScale, 1106 SkScalar surfaceScale,
1107 sk_sp<SkImageFilter> input, const C ropRect* cropRect) 1107 sk_sp<SkImageFilter> input, const C ropRect* cropRect)
1108 : INHERITED(&input, 1, cropRect) 1108 : INHERITED(&input, 1, cropRect)
1109 , fLight(std::move(light)) 1109 , fLight(std::move(light))
1110 , fSurfaceScale(surfaceScale / 255) { 1110 , fSurfaceScale(surfaceScale / 255) {
1111 } 1111 }
1112 1112
1113 SkLightingImageFilter::~SkLightingImageFilter() {}
1114
1113 sk_sp<SkImageFilter> SkLightingImageFilter::MakeDistantLitDiffuse(const SkPoint3 & direction, 1115 sk_sp<SkImageFilter> SkLightingImageFilter::MakeDistantLitDiffuse(const SkPoint3 & direction,
1114 SkColor lightC olor, 1116 SkColor lightC olor,
1115 SkScalar surfa ceScale, 1117 SkScalar surfa ceScale,
1116 SkScalar kd, 1118 SkScalar kd,
1117 sk_sp<SkImageF ilter> input, 1119 sk_sp<SkImageF ilter> input,
1118 const CropRect * cropRect) { 1120 const CropRect * cropRect) {
1119 sk_sp<SkImageFilterLight> light(new SkDistantLight(direction, lightColor)); 1121 sk_sp<SkImageFilterLight> light(new SkDistantLight(direction, lightColor));
1120 return SkDiffuseLightingImageFilter::Make(std::move(light), surfaceScale, kd , 1122 return SkDiffuseLightingImageFilter::Make(std::move(light), surfaceScale, kd ,
1121 std::move(input), cropRect); 1123 std::move(input), cropRect);
1122 } 1124 }
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
2134 2136
2135 fragBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight); 2137 fragBuilder->codeAppendf("%s(%s)", fLightColorFunc.c_str(), surfaceToLight);
2136 } 2138 }
2137 2139
2138 #endif 2140 #endif
2139 2141
2140 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter) 2142 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingImageFilter)
2141 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter) 2143 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkDiffuseLightingImageFilter)
2142 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter) 2144 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSpecularLightingImageFilter)
2143 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 2145 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « include/effects/SkLightingImageFilter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698