| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/resources/one_copy_tile_task_worker_pool.h" | 5 #include "cc/resources/one_copy_tile_task_worker_pool.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 scoped_ptr<ResourceProvider::ScopedWriteLockGpuMemoryBuffer> lock_; | 71 scoped_ptr<ResourceProvider::ScopedWriteLockGpuMemoryBuffer> lock_; |
| 72 CopySequenceNumber sequence_; | 72 CopySequenceNumber sequence_; |
| 73 | 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl); | 74 DISALLOW_COPY_AND_ASSIGN(RasterBufferImpl); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 // Flush interval when performing copy operations. | 77 // Flush interval when performing copy operations. |
| 78 const int kCopyFlushPeriod = 4; | 78 const int kCopyFlushPeriod = 4; |
| 79 | 79 |
| 80 // Number of in-flight copy operations to allow. | 80 // Number of in-flight copy operations to allow. |
| 81 const int kMaxCopyOperations = 16; | 81 const int kMaxCopyOperations = 32; |
| 82 | 82 |
| 83 // Delay been checking for copy operations to complete. | 83 // Delay been checking for copy operations to complete. |
| 84 const int kCheckForCompletedCopyOperationsTickRateMs = 1; | 84 const int kCheckForCompletedCopyOperationsTickRateMs = 1; |
| 85 | 85 |
| 86 // Number of failed attempts to allow before we perform a check that will | 86 // Number of failed attempts to allow before we perform a check that will |
| 87 // wait for copy operations to complete if needed. | 87 // wait for copy operations to complete if needed. |
| 88 const int kFailedAttemptsBeforeWaitIfNeeded = 256; | 88 const int kFailedAttemptsBeforeWaitIfNeeded = 256; |
| 89 | 89 |
| 90 } // namespace | 90 } // namespace |
| 91 | 91 |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 resource_pool_->total_memory_usage_bytes()); | 498 resource_pool_->total_memory_usage_bytes()); |
| 499 staging_state->SetInteger("pending_copy_count", | 499 staging_state->SetInteger("pending_copy_count", |
| 500 resource_pool_->total_resource_count() - | 500 resource_pool_->total_resource_count() - |
| 501 resource_pool_->acquired_resource_count()); | 501 resource_pool_->acquired_resource_count()); |
| 502 staging_state->SetInteger("bytes_pending_copy", | 502 staging_state->SetInteger("bytes_pending_copy", |
| 503 resource_pool_->total_memory_usage_bytes() - | 503 resource_pool_->total_memory_usage_bytes() - |
| 504 resource_pool_->acquired_memory_usage_bytes()); | 504 resource_pool_->acquired_memory_usage_bytes()); |
| 505 } | 505 } |
| 506 | 506 |
| 507 } // namespace cc | 507 } // namespace cc |
| OLD | NEW |