Title: [170051] trunk/Source/WebCore
- Revision
- 170051
- Author
- [email protected]
- Date
- 2014-06-17 00:49:10 -0700 (Tue, 17 Jun 2014)
Log Message
Cache the gst_query_get_n_buffering_ranges() return value for the for-loop conditional
https://bugs.webkit.org/show_bug.cgi?id=133953
Reviewed by Philippe Normand.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::buffered): Avoid the extra call in the for-loop
conditional _expression_ by caching the return value of gst_query_get_n_buffering_ranges().
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (170050 => 170051)
--- trunk/Source/WebCore/ChangeLog 2014-06-17 07:47:27 UTC (rev 170050)
+++ trunk/Source/WebCore/ChangeLog 2014-06-17 07:49:10 UTC (rev 170051)
@@ -1,5 +1,16 @@
2014-06-17 Zan Dobersek <[email protected]>
+ Cache the gst_query_get_n_buffering_ranges() return value for the for-loop conditional
+ https://bugs.webkit.org/show_bug.cgi?id=133953
+
+ Reviewed by Philippe Normand.
+
+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+ (WebCore::MediaPlayerPrivateGStreamer::buffered): Avoid the extra call in the for-loop
+ conditional _expression_ by caching the return value of gst_query_get_n_buffering_ranges().
+
+2014-06-17 Zan Dobersek <[email protected]>
+
Avoid Vector<char> copies in the OffsetBuffer constructor
https://bugs.webkit.org/show_bug.cgi?id=133956
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (170050 => 170051)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2014-06-17 07:47:27 UTC (rev 170050)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp 2014-06-17 07:49:10 UTC (rev 170051)
@@ -862,7 +862,8 @@
return timeRanges;
}
- for (guint index = 0; index < gst_query_get_n_buffering_ranges(query); index++) {
+ guint numBufferingRanges = gst_query_get_n_buffering_ranges(query);
+ for (guint index = 0; index < numBufferingRanges; index++) {
gint64 rangeStart = 0, rangeStop = 0;
if (gst_query_parse_nth_buffering_range(query, index, &rangeStart, &rangeStop))
timeRanges->add(MediaTime::createWithDouble((rangeStart * mediaDuration) / GST_FORMAT_PERCENT_MAX),
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes