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

Side by Side Diff: cc/resource_update_controller.cc

Issue 11347022: cc: Reduce number of partial resource updates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep desktop at 12 Created 8 years, 1 month 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 | « no previous file | no next file » | 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 "config.h" 5 #include "config.h"
6 6
7 #include "cc/resource_update_controller.h" 7 #include "cc/resource_update_controller.h"
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/prioritized_texture.h" 10 #include "cc/prioritized_texture.h"
11 #include "cc/proxy.h" 11 #include "cc/proxy.h"
12 #include "cc/resource_provider.h" 12 #include "cc/resource_provider.h"
13 #include "cc/texture_copier.h" 13 #include "cc/texture_copier.h"
14 #include "cc/thread.h" 14 #include "cc/thread.h"
15 #include "third_party/khronos/GLES2/gl2.h" 15 #include "third_party/khronos/GLES2/gl2.h"
16 #include "third_party/skia/include/gpu/SkGpuDevice.h" 16 #include "third_party/skia/include/gpu/SkGpuDevice.h"
17 #include <limits> 17 #include <limits>
18 #include <public/WebGraphicsContext3D.h> 18 #include <public/WebGraphicsContext3D.h>
19 #include <public/WebSharedGraphicsContext3D.h> 19 #include <public/WebSharedGraphicsContext3D.h>
20 20
21 using WebKit::WebGraphicsContext3D; 21 using WebKit::WebGraphicsContext3D;
22 using WebKit::WebSharedGraphicsContext3D; 22 using WebKit::WebSharedGraphicsContext3D;
23 23
24 namespace { 24 namespace {
25 25
26 // Number of partial updates we allow. 26 // Number of partial updates we allow.
27 #if defined(OS_ANDROID)
28 const size_t partialTextureUpdatesMax = 0;
29 #else
27 const size_t partialTextureUpdatesMax = 12; 30 const size_t partialTextureUpdatesMax = 12;
31 #endif
28 32
29 // Measured in seconds. 33 // Measured in seconds.
30 const double textureUpdateTickRate = 0.004; 34 const double textureUpdateTickRate = 0.004;
31 35
32 // Measured in seconds. 36 // Measured in seconds.
33 const double uploaderBusyTickRate = 0.001; 37 const double uploaderBusyTickRate = 0.001;
34 38
35 // Number of blocking update intervals to allow. 39 // Number of blocking update intervals to allow.
36 const size_t maxBlockingUpdateIntervals = 4; 40 const size_t maxBlockingUpdateIntervals = 4;
37 41
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 if (!uploads) 280 if (!uploads)
277 return; 281 return;
278 282
279 while (m_queue->fullUploadSize() && uploads--) 283 while (m_queue->fullUploadSize() && uploads--)
280 updateTexture(m_queue->takeFirstFullUpload()); 284 updateTexture(m_queue->takeFirstFullUpload());
281 285
282 m_resourceProvider->flushUploads(); 286 m_resourceProvider->flushUploads();
283 } 287 }
284 288
285 } // namespace cc 289 } // namespace cc
OLDNEW
« 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