0
Commit Graph

574 Commits

Author SHA1 Message Date
6cdaff796b Create abstract common base class for impl scrollbars.
BUG=None

NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/11573015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173466 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-17 15:12:36 +00:00
ccb1c9ae33 cc: Make occlusion tracker always work in target space.
On desktop this improves LayerTreeHostPerfTestJsonReader.tenTenSingleThread from ~3702.97 runs/s to ~3786.95 runs/s for about 2%. On a phone we observed about 20% reduction in calcRenderPasses in tracing.

Covered by the occlusion tracker tests as well as LayerTreeHost and TiledLayer tests with occlusion.

BUG=163035
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/11583005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173411 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-17 03:53:19 +00:00
1e0f6c30ca Revert 173406 - Crashes on Win & Mac
[cc] Fold more update calls into updateDrawProperties

Now that we have a clean update system, we can remove the manual
calling of updateRootScrollLayerImplTransform and other similar kinds of "I'm going to do something manually in a half dozen places because I can." This removes some surface area
on LTHI which helps with the LTHI->LTI push.

BUG=155209
R=enne,skyostil

Review URL: https://chromiumcodereview.appspot.com/11529006

TBR=nduca@chromium.org
Review URL: https://codereview.chromium.org/11596005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173407 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-17 01:57:20 +00:00
dd228142a7 [cc] Fold more update calls into updateDrawProperties
Now that we have a clean update system, we can remove the manual
calling of updateRootScrollLayerImplTransform and other similar kinds of "I'm going to do something manually in a half dozen places because I can." This removes some surface area
on LTHI which helps with the LTHI->LTI push.

BUG=155209
R=enne,skyostil

Review URL: https://chromiumcodereview.appspot.com/11529006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173406 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-17 01:16:48 +00:00
009dc0702a cc: Unify namespaces for all test files
All cc test harnesses now live in the cc namespace.  Any cc unittest or
pixeltest itself is in an anonymous namespace under cc.  This patch removes all
instances of the WebKitTest namespace from cc.

R=jamesr@chromium.org
BUG=none


Review URL: https://chromiumcodereview.appspot.com/11474050

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173391 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-16 20:32:13 +00:00
aec65a0ea7 cc: Fix a number of tests that need content bounds
Many cc tests don't call calcDrawProperties and so would have incorrect
content bounds on layers if didUpdateBounds were to be removed.

This patch does not address all of the tests broken by removing that
function, but fixes a large number of them.

R=danakj@chromium.org
BUG=166023


Review URL: https://chromiumcodereview.appspot.com/11573019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173390 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-16 20:31:40 +00:00
ee371e01cb cc: Add TileManager interface that allows LTHI to determine when to activate pending tree.
BUG=166072


Review URL: https://chromiumcodereview.appspot.com/11568027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173385 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-16 20:13:44 +00:00
f117a4cc7c cc: Add some more infrastructure for two trees
PictureLayerImpl gets the ability to sync a tiling from active
to pending tree when it gets created so that layers can share tiles.
A few functions are added to make this possible.

BUG=155209


Review URL: https://chromiumcodereview.appspot.com/11574026

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173366 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-16 04:53:10 +00:00
344e58d049 cc: Refactor content scale/bounds into draw properties
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
2012-12-16 04:52:53 +00:00
ec2eb5f6d6 Add some traces for when render pass caching fails
This makes it easier to diagnose when caches are hitting or missing (and why) in
traces.  It's fairly verbose, but I've been patching it in locally for long enough
that it seems generally useful.


BUG=


Review URL: https://chromiumcodereview.appspot.com/11570036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173359 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-16 04:42:27 +00:00
c22823892c cc: Refactor shared code in tree sync unit tests
This is just a quick refactor that will make adding a pending tree
easier that I thought I'd land separately.

R=jamesr@chromium.org
BUG=none


Review URL: https://chromiumcodereview.appspot.com/11583009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173351 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-16 00:46:03 +00:00
f35e232a94 [Android WebView] Tie together Chrome's browser compositor with the Android View system.
This patch introduces a new feature to the compositor:
- A setting to enable cleaning the framebuffer, disabled by default. This prevents destroying data below us when rendering non-rectangular views (e.g. during a rotation).

A second required feature will be added by a later patch:
- A device scissor rect that intersects any scissor calculation. Used to ensure we never render outside where the Android View System tells us.

There are also some issues with the Android View side regarding the restoration of the GL state. This patch introduces a temporary workaround by reading and manually restoring the state changed by the compositor. This will go out as soon as the problem is fixed in the Android side.

BUG=161409,154180

Review URL: https://chromiumcodereview.appspot.com/11316310

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173324 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-15 21:45:52 +00:00
4c91aec43f Adding support for per vertex opacity on textured layer
BUG=165509


Review URL: https://chromiumcodereview.appspot.com/11570027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173310 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-15 20:17:18 +00:00
a0c1eac882 Make textures that are rendered through the prioritized resource
manager identify themselves as managed to the GPU memory manager
through a GL texture parameter.

This allows the GPU memory manager to get very precise statistics
on evictable memory usage with minimal overhead.

BUG=164947

Review URL: https://codereview.chromium.org/11548052

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173252 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-15 01:26:10 +00:00
0ce5cf3f04 Remove the pools from the ResourceProvider.
Pools were used in the past and were planned to be used to
call deleteOwnedResources. We have moved the responsibility
of deleting resources to the structure that created them
(for example, the PrioritizedResourceManager now deletes
contents textures, instead of calling deleteOwnedResources).

BUG=164947

Review URL: https://codereview.chromium.org/11578019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173212 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-14 21:28:29 +00:00
a91966fd1b cc: Reduce time spent in AssignGpuMemoryToTiles().
BUG=131675
TEST=manual


Review URL: https://chromiumcodereview.appspot.com/11557017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173132 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-14 09:57:29 +00:00
66321643bd Allow using a larger-than-necessary texture as cached render pass backing
When moving a composited layer around the screen that requires a render pass,
it's not all that unusual for the required size to be slightly different from
frame to frame. This lets us use an oversized texture as the framebuffer
attachment.

BUG=161868


Review URL: https://chromiumcodereview.appspot.com/11420079

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173112 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-14 07:13:48 +00:00
361bc00d82 cc: Add id->LayerImpl map to LayerTreeImpl
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
2012-12-14 07:03:24 +00:00
6200cb5ce3 adding render stats for deferred image decoding
BUG=163980


Review URL: https://chromiumcodereview.appspot.com/11575015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173095 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-14 05:14:40 +00:00
4d5bf5a6fc cc: Fix tile deletion.
Tile pointers are left in tiles_that_need_to_be_rasterized_ vector
until ManageTiles() or AssignGpuMemoryToTiles() are called.

BUG=165852


Review URL: https://chromiumcodereview.appspot.com/11549038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173039 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-14 01:42:42 +00:00
1525fa64e1 Add reference png for https://codereview.chromium.org/11420079/
TBR=enne@chromium.org
BUG=161868

Review URL: https://codereview.chromium.org/11575016

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172955 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-13 21:16:47 +00:00
ac33422c07 Moves sampler binding from init to draw time during batched drawing.
Removes the bindings to uniforms from initalization time to draw time
for batched drawing.

BUG=164540
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/11506019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172916 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-13 19:16:15 +00:00
10aabcc348 Mark layers that can use LCD text based on layer transform and opacity.
- 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
2012-12-13 09:18:59 +00:00
458af1e746 Combine mask texture parameters into single gfx::RectF
This folds the 4 floats together into a single parameter to be slightly easier to manage, but doesn't change the logic.

BUG=


Review URL: https://chromiumcodereview.appspot.com/11543013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172825 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-13 05:12:18 +00:00
f760de8e8a Implement the logic to kick off image decoding jobs for TileManager
BUG=163980


Review URL: https://chromiumcodereview.appspot.com/11453014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172813 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-13 04:28:05 +00:00
fc8a5c50b4 cc: Make DelegatedRendererLayerImplTest use FakeLayerTreeHostImplClient
Just some cleanup, since DR. LIT doesn't do anything with the client.

R=danakj@chromium.org
BUG=none


Review URL: https://chromiumcodereview.appspot.com/11553038

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172808 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-13 03:42:39 +00:00
cd48d688a6 explicitly validating assumptions about positive matrix scale
Due to my lack of git know-how this ended up being the entire clipping patch plus my last validation rather than just a few line fix.

Given that the last one got reverted as a test anyway perhaps this is just as well?

BUG=165237

Review URL: https://chromiumcodereview.appspot.com/11481004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172788 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-13 02:42:19 +00:00
35d2edd2e2 Check whether a touch point hits touch event handler regions in root layer
Instead of doing one search over the render surface layer list,
find the layer that the points hits first and then walk up the layer hierarchy
testing for a hit in touch event handler regions. This enables us to use one
touch event handlere region in the root layer.

BUG=135818


Review URL: https://chromiumcodereview.appspot.com/11534024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172778 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-13 02:19:05 +00:00
0a9d5864fc cc: Remove dead function from cc::Layer
R=jamesr@chromium.org
BUG=none


Review URL: https://chromiumcodereview.appspot.com/11550022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172703 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-12 23:38:24 +00:00
b03b45eb0d cc: Disable use of Skia r-tree for impl-side painting
This path needs to be turned off until its correctness issues are fixed.

NOTRY=true
R=nduca@chromium.org
BUG=155209


Review URL: https://chromiumcodereview.appspot.com/11553033

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172697 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-12 23:27:07 +00:00
b5b1fce737 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
2012-12-12 22:49:36 +00:00
ff762fbe1a [cc] Route LayerImpl::layerTreeHostImpl() calls through LayerTreeImpl
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
2012-12-12 19:18:37 +00:00
976389f542 cc: Fix invalidation problems in impl-side painting
The PictureLayerTiling iterator used to stop when it hit a null tile
rather than iterating through null tiles.  So, some invalidations were
ignored because the iterator would hit a null tile from a previous
invalidation rect on the same frame and abort.

This is fixed by making the PictureLayerTiling iterator walk over all i,
j pairs, regardless of whether there is a tile there or not.  The
PictureLayerTilingSet iteration is also made robust to this possibility.

R=nduca@chromium.org
BUG=165246, 165336


Review URL: https://chromiumcodereview.appspot.com/11555002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172519 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-12 04:06:10 +00:00
6af5cab7b0 Reduce more matrix math in calculateDrawProperties
This patch avoids even more math.  cc_perftests on linux desktop improved by about 3-4%.

(0) Skip applying the layer's anchorPoint + transform + inverseAnchorPoint if the layer's transform was identity.

(1) The surface clipRect, projected from ancestor space to current surface
space, is now cached in calcDrawTransforms so it only needs to be computed
once, instead of onces for every layer that contributes to the surface.

(2) The layer's bounds, transformed into target surface space, are passed into
calculateVisibleContentRect, so that this function does not need to redo the
mapClippedRect computation unnecessarily.

(3) The early exit logic was made more aggressive, to early-out as soon as we
realize that none of the layer's drawProperties need to be computed.

BUG=163769

Review URL: https://codereview.chromium.org/11534006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172475 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-12 00:49:47 +00:00
8bef40574e [cc] Make LayerImpls point at LayerTreeImpl instead of LTHI
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
2012-12-11 21:38:08 +00:00
d96fe727ec cc: Temporary diagnostics.
BUG=160485


Review URL: https://chromiumcodereview.appspot.com/11280274

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172375 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-11 19:42:29 +00:00
bdb59cecae cc: Resize picture layer tiling set during commit
Previously, we would only set the tiling set bounds post-calcDraw, which
means that invalidations that came in during the commit would get dropped
because they were outside the content bounds of each tiling.  Fix this by
explicitly updating bounds during the commit prior to invalidation.

This fixes offscreen garbage caused by layer resizing when viewing a
directory with impl-side painting.

The didUpdateBounds function is in line with the direction of the patch
here: https://codereview.chromium.org/11503005/ and can just be made
virtual in the future.

R=nduca@chromium.org
BUG=165246


Review URL: https://chromiumcodereview.appspot.com/11516022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172372 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-11 19:29:32 +00:00
b23c022069 cc: Handle directly composited images in impl-side painting
Directly composited images are recorded into an SkPicture just like normal
content.  This also means that (at the moment) they will be treated like
normal content, such as getting low-res versions.  There will need to be
some future follow-up to make sure that tiny images that end up large
on page don't take up unnecessary GPU memory.

The only bad part about this path is that changing a layer's bounds forces the
content to need to be re-recorded and re-rasterized, as there's an assumption
that the composited image fills its entire bounds.  This could be fixed in the
future by adding another layer (haha) of indirection.

R=nduca@chromium.org
BUG=163998


Review URL: https://chromiumcodereview.appspot.com/11516005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172241 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-11 02:26:53 +00:00
4da02f1aa1 cc: switch FPS counter graph back to a frame based X axis
The time-based graphing of the fps values made the graph move on too quickly on static pages and provided little value in general. This change switches back to a frame based graphing.

BUG=


Review URL: https://chromiumcodereview.appspot.com/11280312

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172235 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-11 02:14:26 +00:00
ab5a94478f Revert 171850
> This patch makes quad-clipping to a scissor window an explicit operation at quad-generation time.  If the transform for the quad is a scale and or a transform clipping is a simple bounding box intersection and uv-recomputation.
> 
> BUG=161871
> 
> 
> Review URL: https://chromiumcodereview.appspot.com/11418297

TBR=whunt@chromium.org
BUG=164997
Review URL: https://codereview.chromium.org/11517007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172152 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-10 22:29:09 +00:00
30461f1bd5 cc: Remove dangerous LayerImpl::removeFromParent
"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
2012-12-10 01:30:20 +00:00
0ede3bb4bb cc: Split out calcDrawEtc from drawLayers
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
2012-12-09 09:14:39 +00:00
63363c745b Fix license header in cc/delegating_renderer
R=danakj

BUG=


Review URL: https://chromiumcodereview.appspot.com/11498002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171998 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-08 22:40:09 +00:00
df1ec1ac79 Revert 171714 - Use an auxiliary list of animation controllers.
> 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
2012-12-08 17:01:18 +00:00
a84325531a cc: Add a blocksPendingCommit flag to LayerImpl
This can't get used yet until we have a pending->active tree commit, but I
wanted to land the flag on layers first so that we could argue about the name.

R=nduca@chromium.org
BUG=164993


Review URL: https://chromiumcodereview.appspot.com/11475054

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171974 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-08 16:44:54 +00:00
be03793baa cc: Fix impl-side painting rasterization at >1 contents scales
Previously there was a content space vs. layer space mixup.  cc::Tile had a
member variable that was labeled rect_in_layer_space, but the tilings were
making a content space rect.  It's actually impossible to have an int rect in
layer space for most content spaces, so this got renamed to just be
content_space rect.

The actual bug was that this rect was being used to check if a given picture's
layer rect intersected it, so as soon as you got over bounds() / content_scale
away from the origin, the tile was getting nothing rastered to it and whatever
memory was in the canvas was being used, which happened to be old tiles.

R=aelias@chromium.org
BUG=164750


Review URL: https://chromiumcodereview.appspot.com/11466032

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171964 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-08 08:48:21 +00:00
4a23c374cf Added LayerTreeHostImpl::layerTreeAsJson which serializes a layer tree
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
2012-12-08 08:38:55 +00:00
d3afa11184 Round managed memory stats to the nearest 8MB, and don't perform
redundant updates, to avoid frequently descheduling the renderer.

BUG=164947

Review URL: https://chromiumcodereview.appspot.com/11470024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171949 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-08 06:24:28 +00:00
14148f1736 cc: Only create tilings for layers that draws content.
BUG=164752
TEST=manual

Review URL: https://chromiumcodereview.appspot.com/11467020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171945 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-08 06:01:49 +00:00
ea9d8f2728 Add the DelegatingRenderer class with its initialize path.
It's a skeleton class that can be initialized so that we can test with it.

Tests:
LayerTreeHostTest.PartialUpdatesWithDelegatingRendererAndGLContent
LayerTreeHostTest.PartialUpdatesWithDelegatingRendererAndSoftwareContent
LayerTreeHostImplTest.partialSwapReceivesDamageRect

R=piman
BUG=146080

Review URL: https://codereview.chromium.org/11464007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171927 0039d316-1c4b-4281-b951-d872f2087c98
2012-12-08 03:39:29 +00:00