OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "cc/texture_uploader.h" | 7 #include "cc/texture_uploader.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/debug/alias.h" | 12 #include "base/debug/alias.h" |
13 #include "base/debug/trace_event.h" | 13 #include "base/debug/trace_event.h" |
14 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
15 #include "cc/texture.h" | 15 #include "cc/texture.h" |
16 #include "cc/prioritized_texture.h" | 16 #include "cc/prioritized_resource.h" |
17 #include "third_party/khronos/GLES2/gl2.h" | 17 #include "third_party/khronos/GLES2/gl2.h" |
18 #include "third_party/khronos/GLES2/gl2ext.h" | 18 #include "third_party/khronos/GLES2/gl2ext.h" |
19 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
20 #include "ui/gfx/vector2d.h" | 20 #include "ui/gfx/vector2d.h" |
21 #include <public/WebGraphicsContext3D.h> | 21 #include <public/WebGraphicsContext3D.h> |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 // How many previous uploads to use when predicting future throughput. | 25 // How many previous uploads to use when predicting future throughput. |
26 static const size_t uploadHistorySizeMax = 1000; | 26 static const size_t uploadHistorySizeMax = 1000; |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 m_texturesPerSecondHistory.erase(m_texturesPerSecondHistory.begin())
; | 351 m_texturesPerSecondHistory.erase(m_texturesPerSecondHistory.begin())
; |
352 m_texturesPerSecondHistory.erase(--m_texturesPerSecondHistory.end())
; | 352 m_texturesPerSecondHistory.erase(--m_texturesPerSecondHistory.end())
; |
353 } | 353 } |
354 m_texturesPerSecondHistory.insert(texturesPerSecond); | 354 m_texturesPerSecondHistory.insert(texturesPerSecond); |
355 | 355 |
356 m_availableQueries.append(m_pendingQueries.takeFirst()); | 356 m_availableQueries.append(m_pendingQueries.takeFirst()); |
357 } | 357 } |
358 } | 358 } |
359 | 359 |
360 } // namespace cc | 360 } // namespace cc |
OLD | NEW |