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

Unified Diff: cc/resources/picture_layer_tiling_set.h

Issue 737943002: Update from https://crrev.com/304715 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « cc/resources/picture.cc ('k') | cc/resources/picture_layer_tiling_set.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling_set.h
diff --git a/cc/resources/picture_layer_tiling_set.h b/cc/resources/picture_layer_tiling_set.h
index 489bc0c37b07c50370d209da100baa8680f11fa4..661dd24b2d2f0707e09d4ccb32d3ec33a957cfa6 100644
--- a/cc/resources/picture_layer_tiling_set.h
+++ b/cc/resources/picture_layer_tiling_set.h
@@ -5,6 +5,8 @@
#ifndef CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_
#define CC_RESOURCES_PICTURE_LAYER_TILING_SET_H_
+#include <set>
+
#include "cc/base/region.h"
#include "cc/base/scoped_ptr_vector.h"
#include "cc/resources/picture_layer_tiling.h"
@@ -64,13 +66,28 @@ class CC_EXPORT PictureLayerTilingSet {
return tilings_[idx];
}
- PictureLayerTiling* TilingAtScale(float scale) const;
+ PictureLayerTiling* FindTilingWithScale(float scale) const;
+ PictureLayerTiling* FindTilingWithResolution(TileResolution resolution) const;
+
+ void MarkAllTilingsNonIdeal();
+
+ // If a tiling exists whose scale is within |snap_to_existing_tiling_ratio|
+ // ratio of |start_scale|, then return that tiling's scale. Otherwise, return
+ // |start_scale|. If multiple tilings match the criteria, return the one with
+ // the least ratio to |start_scale|.
+ float GetSnappedContentsScale(float start_scale,
+ float snap_to_existing_tiling_ratio) const;
+
+ // Returns the maximum contents scale of all tilings, or 0 if no tilings
+ // exist.
+ float GetMaximumContentsScale() const;
// Remove all tilings.
void RemoveAllTilings();
// Remove one tiling.
void Remove(PictureLayerTiling* tiling);
+ void RemoveTilingWithScale(float scale);
// Remove all tiles; keep all tilings.
void RemoveAllTiles();
@@ -82,6 +99,8 @@ class CC_EXPORT PictureLayerTilingSet {
const Occlusion& occlusion_in_layer_space,
bool can_require_tiles_for_activation);
+ void GetAllTilesForTracing(std::set<const Tile*>* tiles) const;
+
// For a given rect, iterates through tiles that can fill it. If no
// set of tiles with resources can fill the rect, then it will iterate
// through null tiles with valid geometry_rect() until the rect is full.
« no previous file with comments | « cc/resources/picture.cc ('k') | cc/resources/picture_layer_tiling_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698