| 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_TILE_H_ | 5 #ifndef CC_TILE_H_ |
| 6 #define CC_TILE_H_ | 6 #define CC_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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 GLenum format, | 66 GLenum format, |
| 67 gfx::Rect rect_inside_picture, | 67 gfx::Rect rect_inside_picture, |
| 68 TileQuality quality); | 68 TileQuality quality); |
| 69 | 69 |
| 70 void SetPicturePile(int frame_number, PicturePile* picture_pile); | 70 void SetPicturePile(int frame_number, PicturePile* picture_pile); |
| 71 void ModifyPriority(int frame_number, const TilePriority& priority); | 71 void ModifyPriority(int frame_number, const TilePriority& priority); |
| 72 | 72 |
| 73 // Returns 0 if not drawable. | 73 // Returns 0 if not drawable. |
| 74 ResourceProvider::ResourceId GetDrawableResourceId(int frame_number); | 74 ResourceProvider::ResourceId GetDrawableResourceId(int frame_number); |
| 75 | 75 |
| 76 const gfx::Rect& opaque_rect() const { return opaque_rect_; } |
| 77 // TODO(enne): Make this real |
| 78 bool contents_swizzled() const { return false; } |
| 79 |
| 76 protected: | 80 protected: |
| 77 // Methods called by TileManager. | 81 // Methods called by TileManager. |
| 78 void DeleteVersionOnRequestOfTileManager(int frame_number); | 82 void DeleteVersionOnRequestOfTileManager(int frame_number); |
| 79 | 83 |
| 80 private: | 84 private: |
| 81 friend class base::RefCounted<Tile>; | 85 friend class base::RefCounted<Tile>; |
| 82 friend class TileManager; | 86 friend class TileManager; |
| 83 | 87 |
| 84 TileVersion* GetVersion(int frame_number); | 88 TileVersion* GetVersion(int frame_number); |
| 85 ~Tile(); | 89 ~Tile(); |
| 86 | 90 |
| 87 TileManager* tile_manager_; | 91 TileManager* tile_manager_; |
| 88 gfx::Rect tile_size_; | 92 gfx::Rect tile_size_; |
| 89 GLenum format_; | 93 GLenum format_; |
| 90 gfx::Rect rect_inside_picture_; | 94 gfx::Rect rect_inside_picture_; |
| 95 gfx::Rect opaque_rect_; |
| 91 TileQuality quality_; | 96 TileQuality quality_; |
| 92 ScopedVector<TileVersion> versions_; | 97 ScopedVector<TileVersion> versions_; |
| 93 }; | 98 }; |
| 94 | 99 |
| 95 } // namespace cc | 100 } // namespace cc |
| 96 | 101 |
| 97 #endif // CC_TILE_H_ | 102 #endif // CC_TILE_H_ |
| OLD | NEW |