| 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/tile_manager.h" | 5 #include "cc/tile_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 return cc::EVENTUALLY_BIN; | 67 return cc::EVENTUALLY_BIN; |
| 68 } | 68 } |
| 69 | 69 |
| 70 } // namespace | 70 } // namespace |
| 71 | 71 |
| 72 namespace cc { | 72 namespace cc { |
| 73 | 73 |
| 74 class RasterThread : public base::Thread { | 74 class RasterThread : public base::Thread { |
| 75 public: | 75 public: |
| 76 RasterThread(const std::string name) | 76 explicit RasterThread(const std::string name) |
| 77 : base::Thread(name.c_str()), | 77 : base::Thread(name.c_str()), |
| 78 num_pending_tasks_(0) { | 78 num_pending_tasks_(0) { |
| 79 Start(); | 79 Start(); |
| 80 } | 80 } |
| 81 virtual ~RasterThread() { | 81 virtual ~RasterThread() { |
| 82 Stop(); | 82 Stop(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 int num_pending_tasks() { return num_pending_tasks_; } | 85 int num_pending_tasks() { return num_pending_tasks_; } |
| 86 | 86 |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 void TileManager::DidFinishTileInitialization(Tile* tile) { | 719 void TileManager::DidFinishTileInitialization(Tile* tile) { |
| 720 ManagedTileState& managed_tile_state = tile->managed_state(); | 720 ManagedTileState& managed_tile_state = tile->managed_state(); |
| 721 DCHECK(managed_tile_state.resource); | 721 DCHECK(managed_tile_state.resource); |
| 722 managed_tile_state.resource_is_being_initialized = false; | 722 managed_tile_state.resource_is_being_initialized = false; |
| 723 managed_tile_state.can_be_freed = true; | 723 managed_tile_state.can_be_freed = true; |
| 724 for (int i = 0; i < NUM_TREES; ++i) | 724 for (int i = 0; i < NUM_TREES; ++i) |
| 725 drawable_tiles_in_bin_count_[managed_tile_state.bin[i]][i]++; | 725 drawable_tiles_in_bin_count_[managed_tile_state.bin[i]][i]++; |
| 726 } | 726 } |
| 727 | 727 |
| 728 } | 728 } |
| OLD | NEW |