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

Side by Side Diff: cc/texture_uploader.cc

Issue 11615020: Clean up cc and webkit/compositor_bindings include path shenanigans (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « cc/texture_copier.cc ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "cc/texture_uploader.h" 5 #include "cc/texture_uploader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "cc/prioritized_resource.h" 13 #include "cc/prioritized_resource.h"
14 #include "cc/resource.h" 14 #include "cc/resource.h"
15 #include "cc/util.h" 15 #include "cc/util.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
16 #include "third_party/khronos/GLES2/gl2.h" 17 #include "third_party/khronos/GLES2/gl2.h"
17 #include "third_party/khronos/GLES2/gl2ext.h" 18 #include "third_party/khronos/GLES2/gl2ext.h"
18 #include "ui/gfx/rect.h" 19 #include "ui/gfx/rect.h"
19 #include "ui/gfx/vector2d.h" 20 #include "ui/gfx/vector2d.h"
20 #include <public/WebGraphicsContext3D.h>
21 21
22 namespace { 22 namespace {
23 23
24 // How many previous uploads to use when predicting future throughput. 24 // How many previous uploads to use when predicting future throughput.
25 static const size_t uploadHistorySizeMax = 1000; 25 static const size_t uploadHistorySizeMax = 1000;
26 static const size_t uploadHistorySizeInitial = 100; 26 static const size_t uploadHistorySizeInitial = 100;
27 27
28 // Global estimated number of textures per second to maintain estimates across 28 // Global estimated number of textures per second to maintain estimates across
29 // subsequent instances of TextureUploader. 29 // subsequent instances of TextureUploader.
30 // More than one thread will not access this variable, so we do not need to sync hronize access. 30 // More than one thread will not access this variable, so we do not need to sync hronize access.
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 m_texturesPerSecondHistory.erase(m_texturesPerSecondHistory.begin()) ; 362 m_texturesPerSecondHistory.erase(m_texturesPerSecondHistory.begin()) ;
363 m_texturesPerSecondHistory.erase(--m_texturesPerSecondHistory.end()) ; 363 m_texturesPerSecondHistory.erase(--m_texturesPerSecondHistory.end()) ;
364 } 364 }
365 m_texturesPerSecondHistory.insert(texturesPerSecond); 365 m_texturesPerSecondHistory.insert(texturesPerSecond);
366 366
367 m_availableQueries.append(m_pendingQueries.takeFirst()); 367 m_availableQueries.append(m_pendingQueries.takeFirst());
368 } 368 }
369 } 369 }
370 370
371 } // namespace cc 371 } // namespace cc
OLDNEW
« no previous file with comments | « cc/texture_copier.cc ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698