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

Side by Side Diff: cc/resources/texture_uploader.cc

Issue 392013005: [#1] Delete reduntdant 19 header files in ui/gfx (8 of 19 by this) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sorted includes Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "cc/resources/texture_uploader.h" 5 #include "cc/resources/texture_uploader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "cc/base/util.h" 12 #include "cc/base/util.h"
13 #include "cc/resources/prioritized_resource.h" 13 #include "cc/resources/prioritized_resource.h"
14 #include "cc/resources/resource.h" 14 #include "cc/resources/resource.h"
15 #include "gpu/GLES2/gl2extchromium.h" 15 #include "gpu/GLES2/gl2extchromium.h"
16 #include "gpu/command_buffer/client/gles2_interface.h" 16 #include "gpu/command_buffer/client/gles2_interface.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/geometry/vector2d.h"
19 #include "ui/gfx/rect.h" 20 #include "ui/gfx/rect.h"
20 #include "ui/gfx/vector2d.h"
21 21
22 using gpu::gles2::GLES2Interface; 22 using gpu::gles2::GLES2Interface;
23 23
24 namespace { 24 namespace {
25 25
26 // How many previous uploads to use when predicting future throughput. 26 // How many previous uploads to use when predicting future throughput.
27 static const size_t kUploadHistorySizeMax = 1000; 27 static const size_t kUploadHistorySizeMax = 1000;
28 static const size_t kUploadHistorySizeInitial = 100; 28 static const size_t kUploadHistorySizeInitial = 100;
29 29
30 // Global estimated number of textures per second to maintain estimates across 30 // Global estimated number of textures per second to maintain estimates across
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 textures_per_second_history_.erase(textures_per_second_history_.begin()); 324 textures_per_second_history_.erase(textures_per_second_history_.begin());
325 textures_per_second_history_.erase(--textures_per_second_history_.end()); 325 textures_per_second_history_.erase(--textures_per_second_history_.end());
326 } 326 }
327 textures_per_second_history_.insert(textures_per_second); 327 textures_per_second_history_.insert(textures_per_second);
328 328
329 available_queries_.push_back(pending_queries_.take_front()); 329 available_queries_.push_back(pending_queries_.take_front());
330 } 330 }
331 } 331 }
332 332
333 } // namespace cc 333 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698