Chromium Code Reviews| 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 "cc/resource_update_controller.h" | 5 #include "cc/resource_update_controller.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "cc/prioritized_resource.h" | 10 #include "cc/prioritized_resource.h" |
| 11 #include "cc/resource_provider.h" | 11 #include "cc/resource_provider.h" |
| 12 #include "cc/texture_copier.h" | 12 #include "cc/texture_copier.h" |
| 13 #include "cc/thread.h" | 13 #include "cc/thread.h" |
| 14 #include "skia/ext/refptr.h" | 14 #include "skia/ext/refptr.h" |
| 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" | 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" |
| 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebSharedGraphicsCo ntext3D.h" | 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebSharedGraphicsCo ntext3D.h" |
| 17 #include "third_party/khronos/GLES2/gl2.h" | 17 #include "third_party/khronos/GLES2/gl2.h" |
| 18 #include "third_party/skia/include/gpu/SkGpuDevice.h" | 18 #include "third_party/skia/include/gpu/SkGpuDevice.h" |
| 19 | 19 |
| 20 using WebKit::WebGraphicsContext3D; | 20 using WebKit::WebGraphicsContext3D; |
| 21 using WebKit::WebSharedGraphicsContext3D; | 21 using WebKit::WebSharedGraphicsContext3D; |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // Number of partial updates we allow. | 25 // Number of partial updates we allow. |
| 26 #if defined(OS_ANDROID) | |
| 27 const size_t partialTextureUpdatesMax = 0; | |
|
enne (OOO)
2012/12/22 01:17:18
I see that you moved this to settings, but where i
danakj
2012/12/22 01:22:38
LayerTreeHost takes the min of settings and the va
| |
| 28 #else | |
| 29 const size_t partialTextureUpdatesMax = 12; | 26 const size_t partialTextureUpdatesMax = 12; |
| 30 #endif | |
| 31 | 27 |
| 32 // Measured in seconds. | 28 // Measured in seconds. |
| 33 const double textureUpdateTickRate = 0.004; | 29 const double textureUpdateTickRate = 0.004; |
| 34 | 30 |
| 35 // Measured in seconds. | 31 // Measured in seconds. |
| 36 const double uploaderBusyTickRate = 0.001; | 32 const double uploaderBusyTickRate = 0.001; |
| 37 | 33 |
| 38 // Number of blocking update intervals to allow. | 34 // Number of blocking update intervals to allow. |
| 39 const size_t maxBlockingUpdateIntervals = 4; | 35 const size_t maxBlockingUpdateIntervals = 4; |
| 40 | 36 |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 if (!uploads) | 283 if (!uploads) |
| 288 return; | 284 return; |
| 289 | 285 |
| 290 while (m_queue->fullUploadSize() && uploads--) | 286 while (m_queue->fullUploadSize() && uploads--) |
| 291 updateTexture(m_queue->takeFirstFullUpload()); | 287 updateTexture(m_queue->takeFirstFullUpload()); |
| 292 | 288 |
| 293 m_resourceProvider->flushUploads(); | 289 m_resourceProvider->flushUploads(); |
| 294 } | 290 } |
| 295 | 291 |
| 296 } // namespace cc | 292 } // namespace cc |
| OLD | NEW |