| 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_PICTURE_PILE_IMPL_H_ | 5 #ifndef CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
| 6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 6 #define CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "cc/base/cc_export.h" | 13 #include "cc/base/cc_export.h" |
| 14 #include "cc/debug/rendering_stats_instrumentation.h" | 14 #include "cc/debug/rendering_stats_instrumentation.h" |
| 15 #include "cc/resources/picture_pile.h" | 15 #include "cc/resources/picture_pile.h" |
| 16 #include "cc/resources/pixel_ref_map.h" |
| 16 #include "cc/resources/raster_source.h" | 17 #include "cc/resources/raster_source.h" |
| 17 #include "skia/ext/analysis_canvas.h" | 18 #include "skia/ext/analysis_canvas.h" |
| 18 #include "skia/ext/refptr.h" | 19 #include "skia/ext/refptr.h" |
| 19 | 20 |
| 20 class SkCanvas; | 21 class SkCanvas; |
| 21 class SkPicture; | 22 class SkPicture; |
| 22 class SkPixelRef; | 23 class SkPixelRef; |
| 23 | 24 |
| 24 namespace gfx { | 25 namespace gfx { |
| 25 class Rect; | 26 class Rect; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 SkPixelRef* operator*() const { return *pixel_ref_iterator_; } | 81 SkPixelRef* operator*() const { return *pixel_ref_iterator_; } |
| 81 PixelRefIterator& operator++(); | 82 PixelRefIterator& operator++(); |
| 82 operator bool() const { return pixel_ref_iterator_; } | 83 operator bool() const { return pixel_ref_iterator_; } |
| 83 | 84 |
| 84 private: | 85 private: |
| 85 void AdvanceToTilePictureWithPixelRefs(); | 86 void AdvanceToTilePictureWithPixelRefs(); |
| 86 | 87 |
| 87 const PicturePileImpl* picture_pile_; | 88 const PicturePileImpl* picture_pile_; |
| 88 gfx::Rect layer_rect_; | 89 gfx::Rect layer_rect_; |
| 89 TilingData::Iterator tile_iterator_; | 90 TilingData::Iterator tile_iterator_; |
| 90 Picture::PixelRefIterator pixel_ref_iterator_; | 91 PixelRefMap::Iterator pixel_ref_iterator_; |
| 91 std::set<const void*> processed_pictures_; | 92 std::set<const void*> processed_pictures_; |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 protected: | 95 protected: |
| 95 friend class PicturePile; | 96 friend class PicturePile; |
| 96 friend class PixelRefIterator; | 97 friend class PixelRefIterator; |
| 97 | 98 |
| 98 // TODO(vmpstr): Change this when pictures are split from invalidation info. | 99 // TODO(vmpstr): Change this when pictures are split from invalidation info. |
| 99 using PictureMapKey = PicturePile::PictureMapKey; | 100 using PictureMapKey = PicturePile::PictureMapKey; |
| 100 using PictureMap = PicturePile::PictureMap; | 101 using PictureMap = PicturePile::PictureMap; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 bool CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const; | 152 bool CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const; |
| 152 | 153 |
| 153 gfx::Rect PaddedRect(const PictureMapKey& key) const; | 154 gfx::Rect PaddedRect(const PictureMapKey& key) const; |
| 154 | 155 |
| 155 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 156 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
| 156 }; | 157 }; |
| 157 | 158 |
| 158 } // namespace cc | 159 } // namespace cc |
| 159 | 160 |
| 160 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 161 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
| OLD | NEW |