| 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 #ifndef CC_RESOURCES_TILE_H_ | 5 #ifndef CC_RESOURCES_TILE_H_ |
| 6 #define CC_RESOURCES_TILE_H_ | 6 #define CC_RESOURCES_TILE_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/memory/scoped_vector.h" | 10 #include "base/memory/scoped_vector.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 gfx::Rect opaque_rect() const { return opaque_rect_; } | 103 gfx::Rect opaque_rect() const { return opaque_rect_; } |
| 104 float contents_scale() const { return contents_scale_; } | 104 float contents_scale() const { return contents_scale_; } |
| 105 gfx::Rect content_rect() const { return content_rect_; } | 105 gfx::Rect content_rect() const { return content_rect_; } |
| 106 | 106 |
| 107 int layer_id() const { return layer_id_; } | 107 int layer_id() const { return layer_id_; } |
| 108 | 108 |
| 109 int source_frame_number() const { return source_frame_number_; } | 109 int source_frame_number() const { return source_frame_number_; } |
| 110 | 110 |
| 111 void set_picture_pile(scoped_refptr<PicturePileImpl> pile) { | 111 void set_picture_pile(scoped_refptr<PicturePileImpl> pile) { |
| 112 DCHECK(pile->CanRaster(contents_scale_, content_rect_)); | 112 DCHECK(pile->CanRaster(contents_scale_, content_rect_)) |
| 113 << gfx::ScaleToEnclosingRect(content_rect_, 1.f / contents_scale_) |
| 114 .ToString(); |
| 113 picture_pile_ = pile; | 115 picture_pile_ = pile; |
| 114 } | 116 } |
| 115 | 117 |
| 116 size_t GPUMemoryUsageInBytes() const; | 118 size_t GPUMemoryUsageInBytes() const; |
| 117 | 119 |
| 118 gfx::Size size() const { return tile_size_.size(); } | 120 gfx::Size size() const { return tile_size_.size(); } |
| 119 | 121 |
| 120 RasterMode DetermineRasterModeForTree(WhichTree tree) const; | 122 RasterMode DetermineRasterModeForTree(WhichTree tree) const; |
| 121 RasterMode DetermineOverallRasterMode() const; | 123 RasterMode DetermineOverallRasterMode() const; |
| 122 | 124 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 172 |
| 171 Id id_; | 173 Id id_; |
| 172 static Id s_next_id_; | 174 static Id s_next_id_; |
| 173 | 175 |
| 174 DISALLOW_COPY_AND_ASSIGN(Tile); | 176 DISALLOW_COPY_AND_ASSIGN(Tile); |
| 175 }; | 177 }; |
| 176 | 178 |
| 177 } // namespace cc | 179 } // namespace cc |
| 178 | 180 |
| 179 #endif // CC_RESOURCES_TILE_H_ | 181 #endif // CC_RESOURCES_TILE_H_ |
| OLD | NEW |