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

Side by Side 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, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_RESOURCES_ACTIVE_PICTURE_LAYER_TILING_H_
6 #define CC_RESOURCES_ACTIVE_PICTURE_LAYER_TILING_H_
7
8 #include <map>
9 #include <utility>
10 #include <vector>
11
12 #include "base/basictypes.h"
13 #include "base/containers/hash_tables.h"
14 #include "base/memory/scoped_ptr.h"
15 #include "cc/base/cc_export.h"
16 #include "cc/base/region.h"
17 #include "cc/base/tiling_data.h"
18 #include "cc/resources/picture_layer_tiling.h"
19 #include "cc/resources/tile.h"
20 #include "cc/resources/tile_priority.h"
21 #include "cc/trees/occlusion.h"
22 #include "ui/gfx/geometry/rect.h"
23
24 namespace base {
25 namespace trace_event {
26 class TracedValue;
27 }
28 }
29
30 namespace cc {
31
32 class PictureLayerTiling;
33 class RasterSource;
34
35 class CC_EXPORT ActivePictureLayerTiling : public PictureLayerTiling {
36 public:
37 // Create a tiling with no tiles. CreateTile() must be called to add some.
38 static scoped_ptr<PictureLayerTiling> Create(
39 float contents_scale,
40 scoped_refptr<RasterSource> raster_source,
41 PictureLayerTilingClient* client,
42 size_t max_tiles_for_interest_area,
43 float skewport_target_time_in_seconds,
44 int skewport_extrapolation_limit_in_content_pixels);
45 ~ActivePictureLayerTiling() override;
46
47 void SetRasterSourceAndResize(
48 const scoped_refptr<RasterSource> raster_source) override;
49 void Invalidate(const Region& layer_invalidation) override;
50 void SetRasterSourceOnTiles() override;
51 void CreateMissingTilesInLiveTilesRect() override;
52 void TakeTilesAndPropertiesFrom(PictureLayerTiling* pending_twin) override;
53
54 bool IsTileOccluded(const Tile* tile) const override;
55 bool IsTileRequiredForActivation(const Tile* tile) const override;
56 bool IsTileRequiredForDraw(const Tile* tile) const override;
57
58 protected:
59 ActivePictureLayerTiling(float contents_scale,
60 scoped_refptr<RasterSource> raster_source,
61 PictureLayerTilingClient* client,
62 size_t max_tiles_for_interest_area,
63 float skewport_target_time_in_seconds,
64 int skewport_extrapolation_limit_in_content_pixels);
65
66 void SetLiveTilesRect(const gfx::Rect& new_live_tiles_rect) override;
67 bool IsTileOccludedOnActiveTree(const Tile* tile) const;
68 };
69
70 } // namespace cc
71
72 #endif // CC_RESOURCES_ACTIVE_PICTURE_LAYER_TILING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698