| 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 | 8 |
| 9 #include "cc/resources/raster_worker_pool.h" | 9 #include "cc/resources/raster_worker_pool.h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 virtual void CheckForCompletedTasks() OVERRIDE { | 26 virtual void CheckForCompletedTasks() OVERRIDE { |
| 27 while (!completed_tasks_.empty()) { | 27 while (!completed_tasks_.empty()) { |
| 28 internal::RasterWorkerPoolTask* task = completed_tasks_.front().get(); | 28 internal::RasterWorkerPoolTask* task = completed_tasks_.front().get(); |
| 29 task->WillComplete(); | 29 task->WillComplete(); |
| 30 task->CompleteOnOriginThread(); | 30 task->CompleteOnOriginThread(); |
| 31 task->DidComplete(); | 31 task->DidComplete(); |
| 32 completed_tasks_.pop_front(); | 32 completed_tasks_.pop_front(); |
| 33 } | 33 } |
| 34 } | 34 } |
| 35 virtual GLenum GetResourceFormat() const OVERRIDE { return GL_RGBA; } | 35 virtual ResourceFormat GetResourceFormat() const OVERRIDE { |
| 36 return RGBA_8888; |
| 37 } |
| 36 virtual void OnRasterTasksFinished() OVERRIDE {} | 38 virtual void OnRasterTasksFinished() OVERRIDE {} |
| 37 virtual void OnRasterTasksRequiredForActivationFinished() OVERRIDE {} | 39 virtual void OnRasterTasksRequiredForActivationFinished() OVERRIDE {} |
| 38 | 40 |
| 39 private: | 41 private: |
| 40 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> > TaskDeque; | 42 typedef std::deque<scoped_refptr<internal::RasterWorkerPoolTask> > TaskDeque; |
| 41 TaskDeque completed_tasks_; | 43 TaskDeque completed_tasks_; |
| 42 }; | 44 }; |
| 43 | 45 |
| 44 } // namespace | 46 } // namespace |
| 45 | 47 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 72 return std::find(tiles_for_raster.begin(), | 74 return std::find(tiles_for_raster.begin(), |
| 73 tiles_for_raster.end(), | 75 tiles_for_raster.end(), |
| 74 tile) != tiles_for_raster.end(); | 76 tile) != tiles_for_raster.end(); |
| 75 } | 77 } |
| 76 | 78 |
| 77 void FakeTileManager::CheckForCompletedTasks() { | 79 void FakeTileManager::CheckForCompletedTasks() { |
| 78 RasterWorkerPoolForTesting()->CheckForCompletedTasks(); | 80 RasterWorkerPoolForTesting()->CheckForCompletedTasks(); |
| 79 } | 81 } |
| 80 | 82 |
| 81 } // namespace cc | 83 } // namespace cc |
| OLD | NEW |