Chromium Code Reviews| Index: third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp |
| diff --git a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp |
| index 034144fedea8f1aadc1f303bd57753a209462abf..047c1349f9b912c96de7e1e899e254111f09462a 100644 |
| --- a/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp |
| +++ b/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp |
| @@ -101,15 +101,12 @@ static bool UpdateYUVComponentSizes(ImageDecoder* decoder, |
| if (!decoder->CanDecodeToYUV()) |
| return false; |
| - IntSize size = decoder->DecodedYUVSize(0); |
| - component_sizes[0].set(size.Width(), size.Height()); |
| - component_width_bytes[0] = decoder->DecodedYUVWidthBytes(0); |
| - size = decoder->DecodedYUVSize(1); |
| - component_sizes[1].set(size.Width(), size.Height()); |
| - component_width_bytes[1] = decoder->DecodedYUVWidthBytes(1); |
| - size = decoder->DecodedYUVSize(2); |
| - component_sizes[2].set(size.Width(), size.Height()); |
| - component_width_bytes[2] = decoder->DecodedYUVWidthBytes(2); |
| + for (int i = 0; i < 3; ++i) { |
|
Srirama
2017/05/22 13:29:30
Suggestion: may be use componentIndex or some othe
|
| + IntSize size = decoder->DecodedYUVSize(i); |
| + component_sizes[i].set(size.Width(), size.Height()); |
| + component_width_bytes[i] = decoder->DecodedYUVWidthBytes(i); |
| + } |
| + |
| return true; |
| } |