summaryrefslogtreecommitdiffstats
path: root/cc/layer_impl.h
Commit message (Collapse)AuthorAgeFilesLines
* Part 10 of cc/ directory shuffles: layersjamesr@chromium.org2013-03-181-528/+0
| | | | | | | | | | | Continuation of https://src.chromium.org/viewvc/chrome?view=rev&revision=188681 BUG=190824 TBR=enne@chromium.org, piman@chromium.org, jschuh@chromium.org, joth@chromium.org Review URL: https://codereview.chromium.org/12916002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188703 0039d316-1c4b-4281-b951-d872f2087c98
* Part 8 of cc/ directory shuffles: resourcesjamesr@chromium.org2013-03-181-1/+1
| | | | | | | | | | | Continuation of https://src.chromium.org/viewvc/chrome?view=rev&revision=188681 BUG=190824 TBR=enne@chromium.org, piman@chromium.org, jschuh@chromium.org Review URL: https://codereview.chromium.org/12471007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188696 0039d316-1c4b-4281-b951-d872f2087c98
* Part 6 of cc/ directory shuffles: quadsjamesr@chromium.org2013-03-181-2/+2
| | | | | | | | | | | Continuation of https://src.chromium.org/viewvc/chrome?view=rev&revision=188681 BUG=190824 TBR=enne@chromium.org, jschuh@chromium.org Review URL: https://codereview.chromium.org/12913005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188693 0039d316-1c4b-4281-b951-d872f2087c98
* Part 5 of cc/ directory shuffles: inputjamesr@chromium.org2013-03-181-1/+1
| | | | | | | | | | | Continuation of https://src.chromium.org/viewvc/chrome?view=rev&revision=188681 BUG=190824 TBR=piman@chromium.org, enne@chromium.org Review URL: https://codereview.chromium.org/12722006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188691 0039d316-1c4b-4281-b951-d872f2087c98
* Part 3 of cc/ directory shuffles: animationjamesr@chromium.org2013-03-181-2/+2
| | | | | | | | | | | Continuation of https://src.chromium.org/viewvc/chrome?view=rev&revision=188681 BUG=190824 TBR=enne@chromium.org, vollick@chromium.org Review URL: https://codereview.chromium.org/12822004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188688 0039d316-1c4b-4281-b951-d872f2087c98
* Part 1 of cc/ directory shuffles: basejamesr@chromium.org2013-03-181-3/+3
| | | | | | | | | | | | | This establishes cc/base/ as discussed in https://groups.google.com/a/chromium.org/d/msg/graphics-dev/wNRsl3BwU_Y/jFXeRQq7e30J. This patch will likely touch the most locations since it moves cc/switches.h BUG=190824 TBR=piman@chromium.org, thakis@chromium.org Review URL: https://codereview.chromium.org/12472028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188681 0039d316-1c4b-4281-b951-d872f2087c98
* Fix viewport and scrollbars for top-controls hiding.aelias@chromium.org2013-03-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Simplify top controls manager to never be in "overlay" mode, i.e. the top controls always push down the contents (note that the browser compositor is responsible for this; the renderer compositor just draws at the top of its surface and sends up the offset as metadata). 2. Introduce the concept of "visibleViewportSize". This is the true user-visible size on the current frame in DIP, not including top-controls or non-overlay scrollbars. This is used for max scroll bounds and scrollbar positioning. 3. Just disable clip layer masksToBounds if top controls are present, since it provides no value in the Android case. 4. Given the dynamism of the viewport size, abandon the WebKit scrollbar code and manually compute scrollbar quads after all. There are three inputs: trackRect (which is the layer size plus some margins); m_verticalAdjust which compensates for the fact the scrollbar layers are positioned by WebKit; and m_normalizedViewport which is a rect that encapsulates the position and size of both scrollbars. NOTRY=true BUG=161303 Review URL: https://chromiumcodereview.appspot.com/12519011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188445 0039d316-1c4b-4281-b951-d872f2087c98
* Do not push properties that are animated on impl only.vollick@chromium.org2013-03-131-0/+2
| | | | | | | | | | | | | | We currently avoid pushing properties when the main thread layer indicates that it is animating. This code was incorrectly left behind after we started animating on the main thread. Recently, we've added support for impl-only animations. We should never push during one of these animations. BUG= Review URL: https://chromiumcodereview.appspot.com/12413020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187875 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Chromify Layer and LayerImpl classes.danakj@chromium.org2013-03-121-340/+423
| | | | | | | | | | | | Style-only change. Bring the Layer and LayerImpl classes into the Chromium style. R=enne,piman,jamesr TBR=joth Review URL: https://chromiumcodereview.appspot.com/12774006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187555 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Make damage on delegated frame damage the host layer.danakj@chromium.org2013-02-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | When the delegated renderer layer receives a frame, it should be considered damaged by the compositor in the same place that the frame had damage. If multiple frames come between commits, then aggregate the damage together. If the scale at which the frame will be draw changes, then damage the whole layer. Tests: LayerTreeHostDelegatedTestLayerUsesFrameDamage.runSingleThread LayerTreeHostDelegatedTestLayerUsesFrameDamage.runMultiThread R=piman BUG=123444 Depends on: https://codereview.chromium.org/12328118/ Review URL: https://chromiumcodereview.appspot.com/12340095 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185123 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Give mask and replica layers a parent.danakj@chromium.org2013-02-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | Mask and replica layers hang off of another layer in the tree. They are not strictly children of the layer but they are attached to it. This patch lets them find the layer they are hanging off, and calls that the layer's parent. We then call them a "dependent" of the layer rather than a "child" to distinguish them but still denote a bidirectional relationship. This will allow us to early out for entire subtrees in the push-properties tree walk (and potentially other tree walks as well), to greatly speed up commit. Tested by LayerTest.maskAndReplicaHasParent BUG=177756 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/12334046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184203 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Add PictureLayerImpl::AsValueenne@chromium.org2013-02-151-0/+5
| | | | | | | | | | | | | This allows for information about contents scales and tilings to be recorded for the frame viewer. R=nduca@chromium.org BUG=176413 Review URL: https://chromiumcodereview.appspot.com/12258044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182747 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Deblur layers that animate-scale-down on creation.danakj@chromium.org2013-02-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Layers that appear at a scale 1.5 with a transform animation that would take them to 1.0 end up drawing with the 1.5 tiling still when they complete their animation. This happens for two reasons: 1. It uses stale data in ManageTilings to tell if the layer is animating. 2. The active tree says it has ideal tilings when it has tilings >= ideal. We fix 1 by setting the animating draw properties flag before computing contents scales in calcDrawProperties. We fix 2 by not telling the scheduler that we drew with all ideal tilings if we did not. While fixing 2 we get rid of the tree walk in swapBuffers, by tracking if any incomplete tiles were used in the AppendQuadsData instead. BUG=173806 NOTRY=true Review URL: https://codereview.chromium.org/12188002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180851 0039d316-1c4b-4281-b951-d872f2087c98
* Fix typo in layer_impl.hqiankun.miao@intel.com2013-02-041-1/+1
| | | | | | | | | | | | | Remove redundant repeated words "but would require redrawing" in the comments in layer_impl.h. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/12090111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180369 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Throttle tile priority updates to once a frame.danakj@chromium.org2013-01-271-1/+2
| | | | | | | | | | | | | | | | | | | | | The tile priority updates happen when calcDrawProperties is called. Now we make sure we early out except in the following cases. On the pending tree, we calculate tile priorities: - Immediately after a commit, so that we can start raster jobs appropriately. - On an animation tick if it is not the same impl frame as the commit occured in. On the active tree, we calculate tile priorities: - During draw, if it is not in the same impl frame as the tree activation occured in. In that frame, we already have priorities from the pending tree. BUG=170807 Review URL: https://chromiumcodereview.appspot.com/12045086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179079 0039d316-1c4b-4281-b951-d872f2087c98
* Activate LayerImpl tree with sync+push instead of pointer swapjamesr@chromium.org2013-01-231-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the activation model to do a push + sync from the pending -> active tree instead of just doing a pointer swap. This fixes behavior for video and scrollbar animations and allows for recycling of the LayerImpl tree from commit to commit. There are several changes: *) The tree synchronization code is templatized to support Layer->LayerImpl and LayerImpl->LayerImpl tree syncs. All LayerImpl subclasses now support a createLayerImpl() call to construct a LayerImpl of matching dynamic type and a LayerImpl::pushPropertiesTo(LayerImpl*) to sync properties. The structural syncing stuff is identical to the existing Layer->LayerImpl sync *) Video layer's provider flow is tweaked. Instead of the VideoLayerImpl being the VideoFrameProvider::Client, a new object VideoFrameProviderClientImpl is. This is constructed initially on the pending tree and associated with the VideoFrameProvider during initial commit (since that happens with the main thread blocked). A reference to this object is passed to the active tree, which then registers itself for setNeedsRedraw notifications when it becomes active. On shutdown, the pending layer's destructor (which always happens first) unhooks the VFPCI from the VideoFrameProvider. This step has to happen during the pending tree commit, not activation, since it has to happen on the impl thread with the main thread blocked. The active VideoLayerImpl can then proceed with a VFPCI that isn't wired up to a VFP until the pending tree is activated, at which point it tears down the VFPCI as well. *) Scrollbar layer IDs are hooked up on the impl thread as well so we can set up the pointers during LayerImpl->LayerImpl tree syncs *) Picture layer syncing is largely unchanged, except that there's new code to do a PictureLayerImpl -> PictureLayerImpl sync. This step simply replaces the active layer's pile and tilings with the pending tree's. BUG=169143 Review URL: https://chromiumcodereview.appspot.com/11882037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178267 0039d316-1c4b-4281-b951-d872f2087c98
* Separate scrollbar animation controller from scrollbar positioningjamesr@chromium.org2013-01-171-5/+13
| | | | | | | | | | | | | | | | ScrollbarAnimationController only has one subclass that does anything (SACLinearFade) and that subclass only controls the scrollbar's opacity. This moves the scrollbar positioning logic out of ScrollbarAnimationController completely and makes the scrollable LayerImpl in charge of moving its scrollbars. This is needed since we only want the opacity animation behavior on the active tree, but we need to keep scroll positions up to date on the pending tree. BUG=169143 Review URL: https://chromiumcodereview.appspot.com/11931033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177505 0039d316-1c4b-4281-b951-d872f2087c98
* Move pending tile priorities to active on tree activationbrianderson@chromium.org2013-01-131-0/+1
| | | | | | | | | | | | This prevents our tile priorites from being stale when the pending tree becomes active. BUG=166780 Review URL: https://chromiumcodereview.appspot.com/11856003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176601 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Walk layer tree to determine if pending tree can be activated.reveman@chromium.org2013-01-121-0/+2
| | | | | | | | | | | | | Remove bin counts from tile manager and instead add a AreVisibleResourcesReady() function to LayerTreeImpl that can be used by LTHI to determine if pending tree can be activated. BUG=168119 Review URL: https://chromiumcodereview.appspot.com/11828027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176560 0039d316-1c4b-4281-b951-d872f2087c98
* This patch prevents the creation of some render targets by informing the ↵whunt@chromium.org2013-01-091-0/+2
| | | | | | | | | | | logic that determines if a sub-tree needs an intermediate render target about the ability of descendants in its sub-tree ability to clip themselves. BUG= Review URL: https://chromiumcodereview.appspot.com/11567034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175919 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a method to access the non-composited content root layer picture pile.leandrogracia@chromium.org2013-01-091-0/+3
| | | | | | | | | | | This method is required to implement the CapturePicture API in Android WebView. BUG=167908 Review URL: https://chromiumcodereview.appspot.com/11731002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175618 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Use maximum tiling contents scales for picture layer scaleenne@chromium.org2013-01-081-0/+6
| | | | | | | | | | | | | | | | | | | Due to the way the math works out for calculating which tiles to use for a given content rect, the content scale for a picture layer has to be the maximum of all the tilings on a layer. Currently, each layer only has one tiling, but this change also creates the infrastructure for adding different tilings over time and clamping contents scales to a minimum. NOTRY=true R=danakj@chromium.org BUG=155209 Review URL: https://chromiumcodereview.appspot.com/11777008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175420 0039d316-1c4b-4281-b951-d872f2087c98
* We don't want to tick animation controllers for non-active layersvollick@chromium.org2013-01-071-0/+1
| | | | | | | | | | | | | With this change, we will only tick animation controllers once one of their corresponding layers is active. R=enne@chromium.org NOTRY=true BUG=None Review URL: https://chromiumcodereview.appspot.com/11633044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175338 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Update max scroll offset for pending treeenne@chromium.org2012-12-201-1/+1
| | | | | | | | | | | | | | | | | | This patch moves UpdateMaxScrollOffset and ContentSize to LayerTreeImpl so it can be called on both threads. This fixes the scrolling issues from adding the pending tree, since now the pending tree has a non-zero max scroll offset and can be scrolled. Additionally, two scrolling functions on LayerImpl (scrollBy / setSentScrollDelta) are updated to update their pending twin when called. This keeps the two layer trees in sync during scrolling operations. BUG=155209 Review URL: https://chromiumcodereview.appspot.com/11636026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174114 0039d316-1c4b-4281-b951-d872f2087c98
* Ref count layer animation controllers.vollick@chromium.org2012-12-201-8/+10
| | | | | | | | | | | | | | | | | With this patch we accomplish the following: 1. layer animation controllers are ref counted (so they can be shared by the two impl trees) 2. the layer tree hosts now own a list of active animation controllers. This allows for a couple of nice things __a. Ticking the animation controllers no longer requires a tree walk __b. We will be able to support ticking of animation controllers for layers that are not yet added to the layer tree. (Support coming in a future patch). 3. animation controllers register and unregister themselves from their respective layer tree host's list when they have an animation to tick. R=nduca@chromium.org,enne@chromium.org BUG=162111 Review URL: https://chromiumcodereview.appspot.com/11598005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174043 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up cc and webkit/compositor_bindings include path shenanigansjamesr@chromium.org2012-12-181-1/+1
| | | | | | | | | | | | | | | | | This removes various include issues in cc/ and webkit/compositor_bindings/ to normalize this code to chromium standards and make webkit/compositor_bindings/ more easily usable. Changes include: 1.) Removing dead stub / test headers and include paths 2.) Removing complex rules designed to make the incantation '#include <public/WebBlah.h>' work since all chromium code can do '#include "third_party/WebKit/Source/Platform/chromium/public/WebBlah.h"' 3.) Expand out WebKit API includes and sort correctly BUG=144577 Review URL: https://codereview.chromium.org/11615020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173799 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Refactor content scale/bounds into draw propertiesenne@chromium.org2012-12-161-8/+3
| | | | | | | | | | | | | | | | | This change allows layer impls to manipulate their content scale. This will allow PictureLayerImpl to pick some contents scale based on the scales of their tilings, rather than being stuck at the contents scale of its PictureLayer. This also de-virtualizes all of the content scale/bounds functions and instead allows a layer to manipulate its draw properties in response to a bounds or contents scale change. BUG=155209 Review URL: https://chromiumcodereview.appspot.com/11503005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173365 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Add id->LayerImpl map to LayerTreeImplenne@chromium.org2012-12-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a prerequisite to two LayerTreeImpls, as PictureLayerImpls in the active tree may need to ask about their pending tree sibilings with the same id. Once this lands, functionality like findScrollingLayerbyId can be wrapped into this too. LayerImpl now registers itself with its tree on creation and destruction. As there are now asserts that a given id is not already in use, a number of tests have been updated to not duplicate layer ids. There doesn't technically need to be an unregister step, but as LayerImpl doesn't necessarily have to be in the LayerImpl tree rooted in the LayerTreeImpl, this unregister check will blow up if anybody has a layer outliving their registered tree (which is bad). As LayerImpl has single ownership, it's impossible to assign the same non-NULL replica or mask to a layer, so the LayerImpl unit tests are updated to not test this anymore. Masks and replicas are also modified to keep their id in sync with their pointer during tree synchronization to prevent asserts about duplicate ids. R=danakj@chromium.org BUG=155209 Review URL: https://chromiumcodereview.appspot.com/11575018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173110 0039d316-1c4b-4281-b951-d872f2087c98
* Mark layers that can use LCD text based on layer transform and opacity.alokp@chromium.org2012-12-131-4/+2
| | | | | | | | | | | | | - Text AA settings are not adjusted during animation to avoid repaints. - Renamed Layer::useLCDText to Layer::canUseLCDText. BUG=100666 Review URL: https://chromiumcodereview.appspot.com/11360093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172842 0039d316-1c4b-4281-b951-d872f2087c98
* Move second internal recursion to a precomputation in layer_tree_host_common.ccshawnsingh@google.com2012-12-121-5/+1
| | | | | | | | | | | | | 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
* [cc] Route LayerImpl::layerTreeHostImpl() calls through LayerTreeImplnduca@chromium.org2012-12-121-1/+0
| | | | | | | | | | | | | Pulled settings & debugstate to their own files to reduce header coupling, which bit me a few times on this patch [lthi needs lth, lti needs lthi for settings, etc]. NOTRY=true BUG=155209 R=enne Review URL: https://chromiumcodereview.appspot.com/11529003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172635 0039d316-1c4b-4281-b951-d872f2087c98
* [cc] Make LayerImpls point at LayerTreeImpl instead of LTHInduca@chromium.org2012-12-111-5/+7
| | | | | | | | | | BUG=155209 R=enne@chromium.org NOTRY=True Review URL: https://chromiumcodereview.appspot.com/11519018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172411 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Remove dangerous LayerImpl::removeFromParentenne@chromium.org2012-12-101-1/+1
| | | | | | | | | | | | "delete this"-style functions considered harmful. R=danakj@chromium.org BUG=none Review URL: https://chromiumcodereview.appspot.com/11491007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172019 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Split out calcDrawEtc from drawLayersenne@chromium.org2012-12-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, calcDrawEtc was coupled to drawLayers. Immediately before drawing, it would get called to update layer state based on any impl-side input that came in after the commit. Impl-side painting needs to update layer transforms / visible content rect state prior to rasterizing contents. And, if input comes in, it might also need to re-update prior to drawing. LayerTreeHostImpl then gets a needsUpdateLayers() flag, and updateLayers() (which calls calcDraw) is a no-op if nothing has changed on the tree. Additionally, the calculate render surface layer list is persisted since the last updateLayers() call. The LayerTreeHostImpl now sets the needsUpdate flag after commit, scroll, pinch zoom, and animation. These are the easy ones. Unfortunately, this creates an amazing foot gun where you can manipulate the impl tree on the impl thread and updateLayers won't get called, because the needsUpdate flag hasn't been called explicitly. This mostly happens in tests, but could happen elsewhere. To fix this, setFoo calls on LayerImpl now calls setNeedsUpdate() on its host. BUG=155209 Review URL: https://chromiumcodereview.appspot.com/11447028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172005 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 171714 - Use an auxiliary list of animation controllers.vollick@chromium.org2012-12-081-5/+10
| | | | | | | | | | | | | | | | | | | > With this patch we accomplish the following: > 1. layer animation controllers are ref counted (so they can be shared by the two impl trees) > 2. the layer tree hosts now own a list of active animation controllers. This allows for a couple of nice things > __a. Ticking the animation controllers no longer requires a tree walk > __b. We will be able to support ticking of animation controllers for layers that are not yet added to the layer tree. (Support coming in a future patch). > 3. animation controllers register and unregister themselves from their respective layer tree host's list when they have an animation to tick. > > BUG=162111 > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171714 TBR=vollick@chromium.org BUG= Review URL: https://codereview.chromium.org/11491003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171981 0039d316-1c4b-4281-b951-d872f2087c98
* Added LayerTreeHostImpl::layerTreeAsJson which serializes a layer treeskaslev@chromium.org2012-12-081-0/+5
| | | | | | | | | | | | to JSON format which can then be loaded and used from our cc_perftests. BUG= Review URL: https://chromiumcodereview.appspot.com/11446076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171963 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Pass LayerTreeHostImpl to LayerImpl constructorenne@chromium.org2012-12-071-4/+3
| | | | | | | | | | | | | | | In order to allow for LayerImpl to notify its host when one of its property changes, it needs to more robustly have its host set (which is not the case in most tests). To avoid a recursive pass when adding children or after layer synchronization, instead just pass it to the constructor of LayerImpl, since a given LayerImpl will never move from one host to another. NOTRY=true BUG=none Review URL: https://chromiumcodereview.appspot.com/11472021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171830 0039d316-1c4b-4281-b951-d872f2087c98
* With this patch we accomplish the following:vollick@chromium.org2012-12-071-11/+6
| | | | | | | | | | | | | | | 1. layer animation controllers are ref counted (so they can be shared by the two impl trees) 2. the layer tree hosts now own a list of active animation controllers. This allows for a couple of nice things __a. Ticking the animation controllers no longer requires a tree walk __b. We will be able to support ticking of animation controllers for layers that are not yet added to the layer tree. (Support coming in a future patch). 3. animation controllers register and unregister themselves from their respective layer tree host's list when they have an animation to tick. BUG=162111 Review URL: https://chromiumcodereview.appspot.com/11348256 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171714 0039d316-1c4b-4281-b951-d872f2087c98
* Move LayerSorter to exist locally only in layer_tree_host_commonshawnsingh@google.com2012-12-071-3/+0
| | | | | | | | | | At this time, LayerSorter does not need to be owned by the layer_tree_host_impl and passed into calculateDrawProperties. This patch moves it to layer_tree_host_common.cpp, and removes any leftovers from other files. Review URL: https://codereview.chromium.org/11465007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171658 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Finish the rename from cc::GraphicsContext to cc::OutputSurfacedanakj@chromium.org2012-12-061-3/+3
| | | | | | | | | | | | | | | It is far too confusing to deal with OutputSurface code when half the time it is called a GraphicsContext incorrectly. Cleaning this up so I can think about the code properly as I upstream the Ubercomp CL. R=jamesr,piman BUG=146080 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171403 Review URL: https://codereview.chromium.org/11450019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171410 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 171403danakj@chromium.org2012-12-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | cc_unittests is failing. Looks like something conflicted with this. > cc: Finish the rename from cc::GraphicsContext to cc::OutputSurface > > It is far too confusing to deal with OutputSurface code when half the time it is > called a GraphicsContext in correctly. Cleaning this up so I can think about the > code properly as I upstream the Ubercomp CL. > > NOTRY=true > R=jamesr,piman > BUG=146080 > > > Review URL: https://chromiumcodereview.appspot.com/11450019 TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/11439026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171406 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Finish the rename from cc::GraphicsContext to cc::OutputSurfacedanakj@chromium.org2012-12-061-3/+3
| | | | | | | | | | | | | | | It is far too confusing to deal with OutputSurface code when half the time it is called a GraphicsContext in correctly. Cleaning this up so I can think about the code properly as I upstream the Ubercomp CL. NOTRY=true R=jamesr,piman BUG=146080 Review URL: https://chromiumcodereview.appspot.com/11450019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171403 0039d316-1c4b-4281-b951-d872f2087c98
* Organize internal properties of cc/ layer typesshawnsingh@google.com2012-12-051-59/+24
| | | | | | | | | | | | | One useful way to classify the various properties in cc/ layer data types is: (1) properties given by the user of the cc APIs, and (2) properties that are computed inside of cc code that are needed to correctly draw the layers. This patch organizes properties internally so that as we develop cc code, we are forced to be aware of whether a property is "given" or "computed". Review URL: https://codereview.chromium.org/11280263 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171323 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Use skia::RefPtr in place of raw pointers and SkAutoTUnref.danakj@chromium.org2012-12-041-3/+5
| | | | | | | | | | | | | Safe reference counting for skia objects ahoy! R=jamesr BUG=163454 Depends on: https://codereview.chromium.org/11418217/ NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11412255 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170889 0039d316-1c4b-4281-b951-d872f2087c98
* Don't create render passes for transparent images.skaslev@chromium.org2012-11-301-4/+8
| | | | | | | | | | | | | That patch speeds up Google Maps use-case smoke test by a factor of 10x. It also reduces memory pressure on the GPU. See the related bugs for more info. BUG=161434,160871 Review URL: https://chromiumcodereview.appspot.com/11316171 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170487 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Add a didUpdateTransforms function to LayerImplenne@chromium.org2012-11-281-0/+2
| | | | | | | | | | This gets called per-layer post calcDraw. BUG=155209 Review URL: https://codereview.chromium.org/11414190 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169859 0039d316-1c4b-4281-b951-d872f2087c98
* Animation code is not yet migrated by this patch, due to WebTransformOperations.shawnsingh@chromium.org2012-11-271-18/+18
| | | | | | | | BUG=159972 Review URL: https://codereview.chromium.org/11308153 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169609 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Minimize the number of times GL scissoring state is changedshawnsingh@chromium.org2012-11-211-1/+11
| | | | | | | | | | | | | | | We may sometimes want to turn off the scissoring optimization. At this time scissoring is used as both an optimization and for correctness when a layer is clipped. This patch separates those concepts and rearranges scissoring logic in an attempt to minimize how often scissoring state changes; scissoring changes very likely cause graphics pipeline to flush which is definitely undesirable. BUG=160358 Review URL: https://chromiumcodereview.appspot.com/11362220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169142 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Don't return non-const Layer* from a const Layer.danakj@chromium.org2012-11-211-6/+12
| | | | | | | | | | | | Const methods should return const Layer*s. Non-const methods return non-const Layer*s. R=enne Review URL: https://chromiumcodereview.appspot.com/11299127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168973 0039d316-1c4b-4281-b951-d872f2087c98
* cc: Add support for debugging layer borders directly in the compositordanakj@chromium.org2012-11-151-11/+5
| | | | | | | | | | | | | | | Instead of supporting --show-composited-layer-borders via the GraphicsLayer debug borders mechanism, show debug borders on layers when the new LayerTreeSetting flag showDebugBorders is enabled. This depends on https://bugs.webkit.org/show_bug.cgi?id=102130 BUG=159769 R=jamesr,enne Review URL: https://chromiumcodereview.appspot.com/11365239 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167815 0039d316-1c4b-4281-b951-d872f2087c98