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/resources/tile.h" | 5 #include "cc/resources/tile.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/trace_event/trace_event_argument.h" | 9 #include "base/trace_event/trace_event_argument.h" |
10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
11 #include "cc/debug/traced_value.h" | 11 #include "cc/debug/traced_value.h" |
12 #include "cc/resources/tile_manager.h" | 12 #include "cc/resources/tile_manager.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 Tile::Id Tile::s_next_id_ = 0; | 16 Tile::Id Tile::s_next_id_ = 0; |
17 | 17 |
18 Tile::Tile(TileManager* tile_manager, | 18 Tile::Tile(TileManager* tile_manager, |
19 RasterSource* raster_source, | |
20 const gfx::Size& desired_texture_size, | 19 const gfx::Size& desired_texture_size, |
21 const gfx::Rect& content_rect, | 20 const gfx::Rect& content_rect, |
22 float contents_scale, | 21 float contents_scale, |
23 int layer_id, | 22 int layer_id, |
24 int source_frame_number, | 23 int source_frame_number, |
25 int flags) | 24 int flags) |
26 : tile_manager_(tile_manager), | 25 : tile_manager_(tile_manager), |
27 desired_texture_size_(desired_texture_size), | 26 desired_texture_size_(desired_texture_size), |
28 content_rect_(content_rect), | 27 content_rect_(content_rect), |
29 contents_scale_(contents_scale), | 28 contents_scale_(contents_scale), |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 return draw_info_.resource_->bytes(); | 71 return draw_info_.resource_->bytes(); |
73 return 0; | 72 return 0; |
74 } | 73 } |
75 | 74 |
76 void Tile::Deleter::operator()(Tile* tile) const { | 75 void Tile::Deleter::operator()(Tile* tile) const { |
77 TileManager* tile_manager = tile->tile_manager_; | 76 TileManager* tile_manager = tile->tile_manager_; |
78 tile_manager->Release(tile); | 77 tile_manager->Release(tile); |
79 } | 78 } |
80 | 79 |
81 } // namespace cc | 80 } // namespace cc |
OLD | NEW |