Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2793)

Unified Diff: cc/resources/active_picture_layer_tiling.h

Issue 1051993002: cc: Remove tile sharing from tilings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/resources/active_picture_layer_tiling.h
diff --git a/cc/resources/active_picture_layer_tiling.h b/cc/resources/active_picture_layer_tiling.h
new file mode 100644
index 0000000000000000000000000000000000000000..d905585d7564b462ce024d5269fe23417d70458e
--- /dev/null
+++ b/cc/resources/active_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_ACTIVE_PICTURE_LAYER_TILING_H_
+#define CC_RESOURCES_ACTIVE_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 ActivePictureLayerTiling : 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);
+ ~ActivePictureLayerTiling() 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;
+
+ protected:
+ ActivePictureLayerTiling(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 IsTileOccludedOnActiveTree(const Tile* tile) const;
+};
+
+} // namespace cc
+
+#endif // CC_RESOURCES_ACTIVE_PICTURE_LAYER_TILING_H_

Powered by Google App Engine
This is Rietveld 408576698