| 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/test/fake_tile_manager.h" | 5 #include "cc/test/fake_tile_manager.h" |
| 6 | 6 |
| 7 #include <deque> | 7 #include <deque> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "cc/resources/raster_worker_pool.h" | 10 #include "cc/resources/raster_worker_pool.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 virtual void CheckForCompletedTasks() OVERRIDE { | 27 virtual void CheckForCompletedTasks() OVERRIDE { |
| 28 while (!completed_tasks_.empty()) { | 28 while (!completed_tasks_.empty()) { |
| 29 internal::RasterWorkerPoolTask* task = completed_tasks_.front().get(); | 29 internal::RasterWorkerPoolTask* task = completed_tasks_.front().get(); |
| 30 task->WillComplete(); | 30 task->WillComplete(); |
| 31 task->CompleteOnOriginThread(); | 31 task->CompleteOnOriginThread(); |
| 32 task->DidComplete(); | 32 task->DidComplete(); |
| 33 completed_tasks_.pop_front(); | 33 completed_tasks_.pop_front(); |
| 34 } | 34 } |
| 35 } | 35 } |
| 36 virtual GLenum GetResourceTarget() const OVERRIDE { |
| 37 return GL_TEXTURE_2D; |
| 38 } |
| 36 virtual ResourceFormat GetResourceFormat() const OVERRIDE { | 39 virtual ResourceFormat GetResourceFormat() const OVERRIDE { |
| 37 return RGBA_8888; | 40 return RGBA_8888; |
| 38 } | 41 } |
| 39 virtual void OnRasterTasksFinished() OVERRIDE {} | 42 virtual void OnRasterTasksFinished() OVERRIDE {} |
| 40 virtual void OnRasterTasksRequiredForActivationFinished() OVERRIDE {} | 43 virtual void OnRasterTasksRequiredForActivationFinished() OVERRIDE {} |
| 41 | 44 |
| 42 private: | 45 private: |
| 43 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> > TaskDeque; | 46 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> > TaskDeque; |
| 44 TaskDeque completed_tasks_; | 47 TaskDeque completed_tasks_; |
| 45 }; | 48 }; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void FakeTileManager::CheckForCompletedTasks() { | 97 void FakeTileManager::CheckForCompletedTasks() { |
| 95 RasterWorkerPoolForTesting()->CheckForCompletedTasks(); | 98 RasterWorkerPoolForTesting()->CheckForCompletedTasks(); |
| 96 } | 99 } |
| 97 | 100 |
| 98 void FakeTileManager::Release(Tile* tile) { | 101 void FakeTileManager::Release(Tile* tile) { |
| 99 TileManager::Release(tile); | 102 TileManager::Release(tile); |
| 100 CleanUpReleasedTiles(); | 103 CleanUpReleasedTiles(); |
| 101 } | 104 } |
| 102 | 105 |
| 103 } // namespace cc | 106 } // namespace cc |
| OLD | NEW |