| 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" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 content_rect_(content_rect), | 28 content_rect_(content_rect), |
| 29 contents_scale_(contents_scale), | 29 contents_scale_(contents_scale), |
| 30 layer_id_(layer_id), | 30 layer_id_(layer_id), |
| 31 source_frame_number_(source_frame_number), | 31 source_frame_number_(source_frame_number), |
| 32 flags_(flags), | 32 flags_(flags), |
| 33 tiling_i_index_(-1), | 33 tiling_i_index_(-1), |
| 34 tiling_j_index_(-1), | 34 tiling_j_index_(-1), |
| 35 required_for_activation_(false), | 35 required_for_activation_(false), |
| 36 required_for_draw_(false), | 36 required_for_draw_(false), |
| 37 id_(s_next_id_++), | 37 id_(s_next_id_++), |
| 38 invalidated_id_(0), |
| 38 scheduled_priority_(0) { | 39 scheduled_priority_(0) { |
| 39 set_raster_source(raster_source); | 40 set_raster_source(raster_source); |
| 40 } | 41 } |
| 41 | 42 |
| 42 Tile::~Tile() { | 43 Tile::~Tile() { |
| 43 TRACE_EVENT_OBJECT_DELETED_WITH_ID( | 44 TRACE_EVENT_OBJECT_DELETED_WITH_ID( |
| 44 TRACE_DISABLED_BY_DEFAULT("cc.debug"), | 45 TRACE_DISABLED_BY_DEFAULT("cc.debug"), |
| 45 "cc::Tile", this); | 46 "cc::Tile", this); |
| 46 } | 47 } |
| 47 | 48 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 return draw_info_.resource_->bytes(); | 81 return draw_info_.resource_->bytes(); |
| 81 return 0; | 82 return 0; |
| 82 } | 83 } |
| 83 | 84 |
| 84 void Tile::Deleter::operator()(Tile* tile) const { | 85 void Tile::Deleter::operator()(Tile* tile) const { |
| 85 TileManager* tile_manager = tile->tile_manager_; | 86 TileManager* tile_manager = tile->tile_manager_; |
| 86 tile_manager->Release(tile); | 87 tile_manager->Release(tile); |
| 87 } | 88 } |
| 88 | 89 |
| 89 } // namespace cc | 90 } // namespace cc |
| OLD | NEW |