| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 SkPixelRef* operator*() const { return *pixel_ref_iterator_; } | 79 SkPixelRef* operator*() const { return *pixel_ref_iterator_; } |
| 79 PixelRefIterator& operator++(); | 80 PixelRefIterator& operator++(); |
| 80 operator bool() const { return pixel_ref_iterator_; } | 81 operator bool() const { return pixel_ref_iterator_; } |
| 81 | 82 |
| 82 private: | 83 private: |
| 83 void AdvanceToTilePictureWithPixelRefs(); | 84 void AdvanceToTilePictureWithPixelRefs(); |
| 84 | 85 |
| 85 const PicturePileImpl* picture_pile_; | 86 const PicturePileImpl* picture_pile_; |
| 86 gfx::Rect layer_rect_; | 87 gfx::Rect layer_rect_; |
| 87 TilingData::Iterator tile_iterator_; | 88 TilingData::Iterator tile_iterator_; |
| 88 Picture::PixelRefIterator pixel_ref_iterator_; | 89 PixelRefMapIterator pixel_ref_iterator_; |
| 89 std::set<const void*> processed_pictures_; | 90 std::set<const void*> processed_pictures_; |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 protected: | 93 protected: |
| 93 friend class PicturePile; | 94 friend class PicturePile; |
| 94 friend class PixelRefIterator; | 95 friend class PixelRefIterator; |
| 95 | 96 |
| 96 // TODO(vmpstr): Change this when pictures are split from invalidation info. | 97 // TODO(vmpstr): Change this when pictures are split from invalidation info. |
| 97 using PictureMapKey = PicturePile::PictureMapKey; | 98 using PictureMapKey = PicturePile::PictureMapKey; |
| 98 using PictureMap = PicturePile::PictureMap; | 99 using PictureMap = PicturePile::PictureMap; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 bool CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const; | 149 bool CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const; |
| 149 | 150 |
| 150 gfx::Rect PaddedRect(const PictureMapKey& key) const; | 151 gfx::Rect PaddedRect(const PictureMapKey& key) const; |
| 151 | 152 |
| 152 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); | 153 DISALLOW_COPY_AND_ASSIGN(PicturePileImpl); |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 } // namespace cc | 156 } // namespace cc |
| 156 | 157 |
| 157 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ | 158 #endif // CC_RESOURCES_PICTURE_PILE_IMPL_H_ |
| OLD | NEW |