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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp

Issue 2897953002: Remove loop unrolling code in UpdateYUVComponentSizes. (Closed)
Patch Set: y Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5ed0c32cb845f5c8a4052e7b3207a22688b238b1 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 yuv_index = 0; yuv_index < 3; ++yuv_index) {
+ IntSize size = decoder->DecodedYUVSize(yuv_index);
+ component_sizes[yuv_index].set(size.Width(), size.Height());
+ component_width_bytes[yuv_index] = decoder->DecodedYUVWidthBytes(yuv_index);
+ }
+
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698