Skip to content

Commit df586b7

Browse files
bsalomonSkia Commit-Bot
authored andcommitted
Use float literal with std::fill of floats
Change-Id: Ie96b3d0cb7e9f8d9070c25c90a41641ae3114ec8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220236 Commit-Queue: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
1 parent 3e5b017 commit df586b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gpu/GrRenderTargetContext.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,7 +2265,7 @@ void GrRenderTargetContext::asyncRescaleAndReadPixelsYUV420(
22652265

22662266
// This matrix generates (r,g,b,a) = (0, 0, 0, y)
22672267
float yM[20];
2268-
std::fill_n(yM, 15, 0);
2268+
std::fill_n(yM, 15, 0.f);
22692269
yM[15] = baseM[0]; yM[16] = baseM[1]; yM[17] = baseM[2]; yM[18] = 0; yM[19] = baseM[3];
22702270
GrPaint yPaint;
22712271
yPaint.addColorTextureProcessor(srcProxy, texMatrix);
@@ -2284,7 +2284,7 @@ void GrRenderTargetContext::asyncRescaleAndReadPixelsYUV420(
22842284
texMatrix.preScale(2.f, 2.f);
22852285
// This matrix generates (r,g,b,a) = (0, 0, 0, u)
22862286
float uM[20];
2287-
std::fill_n(uM, 15, 0);
2287+
std::fill_n(uM, 15, 0.f);
22882288
uM[15] = baseM[4]; uM[16] = baseM[5]; uM[17] = baseM[6]; uM[18] = 0; uM[19] = baseM[7];
22892289
GrPaint uPaint;
22902290
uPaint.addColorTextureProcessor(srcProxy, texMatrix, GrSamplerState::ClampBilerp());
@@ -2302,7 +2302,7 @@ void GrRenderTargetContext::asyncRescaleAndReadPixelsYUV420(
23022302

23032303
// This matrix generates (r,g,b,a) = (0, 0, 0, v)
23042304
float vM[20];
2305-
std::fill_n(vM, 15, 0);
2305+
std::fill_n(vM, 15, 0.f);
23062306
vM[15] = baseM[8]; vM[16] = baseM[9]; vM[17] = baseM[10]; vM[18] = 0; vM[19] = baseM[11];
23072307
GrPaint vPaint;
23082308
vPaint.addColorTextureProcessor(srcProxy, texMatrix, GrSamplerState::ClampBilerp());

0 commit comments

Comments
 (0)