Index: cc/resources/pending_picture_layer_tiling.h |
diff --git a/cc/resources/pending_picture_layer_tiling.h b/cc/resources/pending_picture_layer_tiling.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5dec84fc7b9b7c9eb052e21efc77ab7c04c35895 |
--- /dev/null |
+++ b/cc/resources/pending_picture_layer_tiling.h |
@@ -0,0 +1,72 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CC_RESOURCES_PENDING_PICTURE_LAYER_TILING_H_ |
+#define CC_RESOURCES_PENDING_PICTURE_LAYER_TILING_H_ |
+ |
+#include <map> |
+#include <utility> |
+#include <vector> |
+ |
+#include "base/basictypes.h" |
+#include "base/containers/hash_tables.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "cc/base/cc_export.h" |
+#include "cc/base/region.h" |
+#include "cc/base/tiling_data.h" |
+#include "cc/resources/picture_layer_tiling.h" |
+#include "cc/resources/tile.h" |
+#include "cc/resources/tile_priority.h" |
+#include "cc/trees/occlusion.h" |
+#include "ui/gfx/geometry/rect.h" |
+ |
+namespace base { |
+namespace trace_event { |
+class TracedValue; |
+} |
+} |
+ |
+namespace cc { |
+ |
+class PictureLayerTiling; |
+class RasterSource; |
+ |
+class CC_EXPORT PendingPictureLayerTiling : public PictureLayerTiling { |
+ public: |
+ // Create a tiling with no tiles. CreateTile() must be called to add some. |
+ static scoped_ptr<PictureLayerTiling> Create( |
+ float contents_scale, |
+ scoped_refptr<RasterSource> raster_source, |
+ PictureLayerTilingClient* client, |
+ size_t max_tiles_for_interest_area, |
+ float skewport_target_time_in_seconds, |
+ int skewport_extrapolation_limit_in_content_pixels); |
+ ~PendingPictureLayerTiling() override; |
+ |
+ void SetRasterSourceAndResize( |
+ const scoped_refptr<RasterSource> raster_source) override; |
+ void Invalidate(const Region& layer_invalidation) override; |
+ void SetRasterSourceOnTiles() override; |
+ void CreateMissingTilesInLiveTilesRect() override; |
+ void TakeTilesAndPropertiesFrom(PictureLayerTiling* pending_twin) override; |
+ |
+ bool IsTileOccluded(const Tile* tile) const override; |
+ bool IsTileRequiredForActivation(const Tile* tile) const override; |
+ bool IsTileRequiredForDraw(const Tile* tile) const override; |
+ |
+ private: |
+ PendingPictureLayerTiling(float contents_scale, |
+ scoped_refptr<RasterSource> raster_source, |
+ PictureLayerTilingClient* client, |
+ size_t max_tiles_for_interest_area, |
+ float skewport_target_time_in_seconds, |
+ int skewport_extrapolation_limit_in_content_pixels); |
+ |
+ void SetLiveTilesRect(const gfx::Rect& new_live_tiles_rect) override; |
+ bool ShouldCreateTileAt(int i, int j) const; |
+}; |
+ |
+} // namespace cc |
+ |
+#endif // CC_RESOURCES_PENDING_PICTURE_LAYER_TILING_H_ |