diff options
author | shawnsingh@google.com <shawnsingh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-12 22:49:36 +0000 |
---|---|---|
committer | shawnsingh@google.com <shawnsingh@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-12 22:49:36 +0000 |
commit | b5b1fce737f34da448e675023e92d881648de290 (patch) | |
tree | d5821c82be24ddfec096756d3b7c6d5c89fddfcc /cc/layer_impl.h | |
parent | fb817ecdfedf75117cf88b8f71eae6963e75bd47 (diff) | |
download | chromium_src-b5b1fce737f34da448e675023e92d881648de290.zip chromium_src-b5b1fce737f34da448e675023e92d881648de290.tar.gz chromium_src-b5b1fce737f34da448e675023e92d881648de290.tar.bz2 |
Move second internal recursion to a precomputation in layer_tree_host_common.cc
Asymptotically, the recursive algorithm in calculateDrawTransforms is O(n^2)
because of a secondary recursion that occurs for every layer in
subtreeShouldRenderToSeparateSurface.
This patch moves the internal secondary recursion into a pre-walk, caching
the meaningful result of that recursion, so that the algorithm is O(2 * n).
Review URL: https://codereview.chromium.org/11419284
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172682 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layer_impl.h')
-rw-r--r-- | cc/layer_impl.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/cc/layer_impl.h b/cc/layer_impl.h index fb34776..400d037 100644 --- a/cc/layer_impl.h +++ b/cc/layer_impl.h @@ -94,6 +94,7 @@ public: virtual ResourceProvider::ResourceId contentsResourceId() const; + virtual bool hasDelegatedContent() const; virtual bool hasContributingDelegatedRenderPasses() const; virtual RenderPass::Id firstContributingRenderPassId() const; virtual RenderPass::Id nextContributingRenderPassId(RenderPass::Id) const; @@ -105,11 +106,6 @@ public: bool forceRenderSurface() const { return m_forceRenderSurface; } void setForceRenderSurface(bool force) { m_forceRenderSurface = force; } - // Returns 0 if none of the layer's descendants has content to draw, - // 1 if exactly one descendant has content to draw, or a number >1 - // (but necessary the exact number of descendants) otherwise. - virtual int descendantsDrawContent(); - void setAnchorPoint(const gfx::PointF&); const gfx::PointF& anchorPoint() const { return m_anchorPoint; } |