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

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

Issue 2897953002: Remove loop unrolling code in UpdateYUVComponentSizes. (Closed)
Patch Set: 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..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;
}
« 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