summaryrefslogtreecommitdiffstats
path: root/cc/layers/picture_layer_impl.h
diff options
context:
space:
mode:
authordanakj <danakj@chromium.org>2014-12-18 13:26:19 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-18 21:26:41 +0000
commitf1543da5801d15bbc6cf5ea03cc5c27b3565e906 (patch)
tree13fee858568bf7fdb2a70b200f0c7e1af885c049 /cc/layers/picture_layer_impl.h
parent936440ef9d5f20240add45de0712b816b46da647 (diff)
downloadchromium_src-f1543da5801d15bbc6cf5ea03cc5c27b3565e906.zip
chromium_src-f1543da5801d15bbc6cf5ea03cc5c27b3565e906.tar.gz
chromium_src-f1543da5801d15bbc6cf5ea03cc5c27b3565e906.tar.bz2
cc: Replace empty tile size with max content scale for mask layers.
Mask layers use a single tile, so the content bounds of a tiling can't exceed the max_texture_size for the current renderer. Previously we always created a tiling at the ideal scale and then just didn't put a tile in it if the tiling was too big (by returning an empty size from PictureLayerImpl::CalculateTileSize). Instead, introduce a MaximumContentsScale() similar to the MinimumContentsScale() on PictureLayerImpl, which is used for mask layers to ensure a tiling is not made at a scale larger than is ok for the max_texture_size. And if no tiling is possible then CanHaveTilings() is false and the layer has no tilings. This changes the behaviour for mask layers that are huge (like > 100k pixels tall/wide), in that instead of the mask just completely disappearing, it's scale will downgrade making the mask become less sharp instead. Also removes the SyncTilings(ForTesting) method from PictureLayerTilingSet and the tests for it, replacing them with better tests for the new non-syncing-tilings world. R=enne, vmpstr BUG=387116 Review URL: https://codereview.chromium.org/819433002 Cr-Commit-Position: refs/heads/master@{#309076}
Diffstat (limited to 'cc/layers/picture_layer_impl.h')
-rw-r--r--cc/layers/picture_layer_impl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/cc/layers/picture_layer_impl.h b/cc/layers/picture_layer_impl.h
index 7ad4e7e..ed984345 100644
--- a/cc/layers/picture_layer_impl.h
+++ b/cc/layers/picture_layer_impl.h
@@ -121,11 +121,11 @@ class CC_EXPORT PictureLayerImpl
void CleanUpTilingsOnActiveLayer(
std::vector<PictureLayerTiling*> used_tilings);
float MinimumContentsScale() const;
+ float MaximumContentsScale() const;
void ResetRasterScale();
gfx::Rect GetViewportForTilePriorityInContentSpace() const;
PictureLayerImpl* GetRecycledTwinLayer() const;
- bool CanHaveTilingWithScale(float contents_scale) const;
void SanityCheckTilingState() const;
// Checks if all tiles required for a certain action (e.g. activation) are
// ready to draw. is_tile_required_callback gets called on all candidate