| 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> |
| 8 |
| 7 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 8 #include "cc/prioritized_resource.h" | 10 #include "cc/prioritized_resource.h" |
| 9 #include "cc/resource_provider.h" | 11 #include "cc/resource_provider.h" |
| 10 #include "cc/texture_copier.h" | 12 #include "cc/texture_copier.h" |
| 11 #include "cc/thread.h" | 13 #include "cc/thread.h" |
| 12 #include "skia/ext/refptr.h" | 14 #include "skia/ext/refptr.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" |
| 13 #include "third_party/khronos/GLES2/gl2.h" | 17 #include "third_party/khronos/GLES2/gl2.h" |
| 14 #include "third_party/skia/include/gpu/SkGpuDevice.h" | 18 #include "third_party/skia/include/gpu/SkGpuDevice.h" |
| 15 #include <limits> | |
| 16 #include <public/WebGraphicsContext3D.h> | |
| 17 #include <public/WebSharedGraphicsContext3D.h> | |
| 18 | 19 |
| 19 using WebKit::WebGraphicsContext3D; | 20 using WebKit::WebGraphicsContext3D; |
| 20 using WebKit::WebSharedGraphicsContext3D; | 21 using WebKit::WebSharedGraphicsContext3D; |
| 21 | 22 |
| 22 namespace { | 23 namespace { |
| 23 | 24 |
| 24 // Number of partial updates we allow. | 25 // Number of partial updates we allow. |
| 25 #if defined(OS_ANDROID) | 26 #if defined(OS_ANDROID) |
| 26 const size_t partialTextureUpdatesMax = 0; | 27 const size_t partialTextureUpdatesMax = 0; |
| 27 #else | 28 #else |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 if (!uploads) | 287 if (!uploads) |
| 287 return; | 288 return; |
| 288 | 289 |
| 289 while (m_queue->fullUploadSize() && uploads--) | 290 while (m_queue->fullUploadSize() && uploads--) |
| 290 updateTexture(m_queue->takeFirstFullUpload()); | 291 updateTexture(m_queue->takeFirstFullUpload()); |
| 291 | 292 |
| 292 m_resourceProvider->flushUploads(); | 293 m_resourceProvider->flushUploads(); |
| 293 } | 294 } |
| 294 | 295 |
| 295 } // namespace cc | 296 } // namespace cc |
| OLD | NEW |