| 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 "config.h" | 5 #include "config.h" |
| 6 | 6 |
| 7 #include "CCTextureUpdateController.h" | 7 #include "cc/texture_update_controller.h" |
| 8 | 8 |
| 9 #include "third_party/khronos/GLES2/gl2.h" | |
| 10 #include "CCResourceProvider.h" | 9 #include "CCResourceProvider.h" |
| 11 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| 12 #include "cc/prioritized_texture.h" | 11 #include "cc/prioritized_texture.h" |
| 13 #include "cc/proxy.h" | 12 #include "cc/proxy.h" |
| 14 #include "cc/texture_copier.h" | 13 #include "cc/texture_copier.h" |
| 14 #include "third_party/khronos/GLES2/gl2.h" |
| 15 #include "third_party/skia/include/gpu/SkGpuDevice.h" |
| 15 #include <limits> | 16 #include <limits> |
| 16 #include <public/WebGraphicsContext3D.h> | 17 #include <public/WebGraphicsContext3D.h> |
| 17 #include <public/WebSharedGraphicsContext3D.h> | 18 #include <public/WebSharedGraphicsContext3D.h> |
| 18 #include "third_party/skia/include/gpu/SkGpuDevice.h" | |
| 19 #include <wtf/CurrentTime.h> | 19 #include <wtf/CurrentTime.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 const size_t partialTextureUpdatesMax = 12; | 27 const size_t partialTextureUpdatesMax = 12; |
| 28 | 28 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 while (m_queue->fullUploadSize() && uploadCount < uploads) { | 283 while (m_queue->fullUploadSize() && uploadCount < uploads) { |
| 284 if (!(uploadCount % textureUploadFlushPeriod) && uploadCount) | 284 if (!(uploadCount % textureUploadFlushPeriod) && uploadCount) |
| 285 m_resourceProvider->shallowFlushIfSupported(); | 285 m_resourceProvider->shallowFlushIfSupported(); |
| 286 updateTexture(m_queue->takeFirstFullUpload()); | 286 updateTexture(m_queue->takeFirstFullUpload()); |
| 287 uploadCount++; | 287 uploadCount++; |
| 288 } | 288 } |
| 289 m_resourceProvider->shallowFlushIfSupported(); | 289 m_resourceProvider->shallowFlushIfSupported(); |
| 290 } | 290 } |
| 291 | 291 |
| 292 } // namespace cc | 292 } // namespace cc |
| OLD | NEW |