0
Commit Graph

332 Commits

Author SHA1 Message Date
4f4d8b5349 cc: Turn overdraw metrics on only when about:tracing is recording.
Now that we're in chromium, we can tell if about:tracing is enabled ot not!
Turn on overdraw metrics, and their expensive computations, only when
about:tracing is turned on.

When we do turn them on, we don't want the performance characteristics of
the system to suddenly change, or the tracing is not very meaningful! So, we
track the number of pixels read, instead of written, for overdraw (which
should mostly be the same with the new rasterScale feature). This
computation is very cheap compared to the old one.

TBR=jamesr
BUG=119126
Relanding: https://codereview.chromium.org/11293143/

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166521 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-07 21:20:33 +00:00
3b10a30273 cc: Rename PrioritizedTexture to PrioritizedResource.
sed -e '
s/PrioritizedTexture/PrioritizedResource/g
s/prioritized_texture/prioritized_resource/g
s/PRIORITIZED_TEXTURE/PRIORITIZED_RESOURCE/g
s/managedTexture/managedResource/g
s/textureManager/resourceManager/g
s/constentsTextureManager/constentsResourceManager/g
'

BUG=
TEST=cc_unittests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166520 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-07 21:16:40 +00:00
2d4dbdb0bd Revert 166464 - Turn overdraw metrics on only when about:tracing is recording.
Now that we're in chromium, we can tell if about:tracing is enabled ot not!
Turn on overdraw metrics, and their expensive computations, only when
about:tracing is turned on.

When we do turn them on, we don't want the performance characteristics of
the system to suddenly change, or the tracing is not very meaningful! So, we
track the number of pixels read, instead of written, for overdraw (which
should mostly be the same with the new rasterScale feature). This
computation is very cheap compared to the old one.

R=jamesr
BUG=119126

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

TBR=danakj@chromium.org
Review URL: https://codereview.chromium.org/11364132

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166477 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-07 18:40:14 +00:00
5e533c5cfd Turn overdraw metrics on only when about:tracing is recording.
Now that we're in chromium, we can tell if about:tracing is enabled ot not!
Turn on overdraw metrics, and their expensive computations, only when
about:tracing is turned on.

When we do turn them on, we don't want the performance characteristics of
the system to suddenly change, or the tracing is not very meaningful! So, we
track the number of pixels read, instead of written, for overdraw (which
should mostly be the same with the new rasterScale feature). This
computation is very cheap compared to the old one.

R=jamesr
BUG=119126

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166464 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-07 17:47:32 +00:00
b407cd6e2b cc: Fix nine patch layer resource management bugs.
This switches back to using if (m_resource) in pushPropertiesTo() since
it may be called before setNeedsDisplay().  Also, switch to
checking if resourceId == 0 instead of backingResourceIsDeleted() since
that asserts it's only called on the impl thread.


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166399 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-07 12:22:21 +00:00
7e691b8439 cc: Sort the source file list of unittests.
R=danakj@chromium.org, enne@chromium.org
TBR=enne@chromium.org


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166363 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-07 05:02:20 +00:00
114e65d34c cc: Replace the WebCore::UnitBezier class with the SkUnitCubicInterp() method from Skia.
This method exists in Skia, but is not publicly consumable/linkable with a
component build. Skia will expose this (or a similar) method through a proper
public API, and we should use it. But in the meantime, we make a copy of the
method in timing_function.cc, and use it there in place of WebCore's UnitBezier
class.

Tests:
cc_unittests:TimingFunctionTest.CubicBezierTimingFunction

This test compares the output of the timing function against baseline values
recorded with WebCore's UnitBezier class. If new methods are able to come
closer to those values, we should decrease the epsilon used in the test
accordingly.

R=jamesr
BUG=147395

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166362 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-07 04:59:34 +00:00
a90aa708ce LayerImpl::tryScroll must convert its content-space point to layer space before comparing to the nonFastScrollableRegion.
The hit test resulting point that the tryScroll() method gets is in content
space, since it is the result of mapping via the inverse screenSpaceTransform.
However, the nonFastScrollableRegion is in layer space, so it should not compare
the point against the region directly. We add a conversion from content to layer
space before doing the test.

This is now covered by the following tests. Because the layer is given a
contentsScale, the tests fail without the above change made to tryScroll.

Tests:
cc_unittests:LayerTreeHostImplTest.nonFastScrollableRegionBasic
cc_unittests:LayerTreeHostImplTest.nonFastScrollableRegionWithOffset

R=enne
BUG=159676


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166353 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-07 04:48:24 +00:00
8284dcb2e0 cc: Disable partial resource updates on Android.
This makes partialTextureUpdatesMax constant 0 when building for OS_ANDROID.
    
BUG=156945
TEST=manual


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166347 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-07 04:40:12 +00:00
bb87580f83 cc: Maximize pending updates.
This makes the resource update controller maintain a maximum number of
pending updates. This keeps our pipeline better filled without
theoretically increasing the risk that we delay drawing at vsync tick.

BUG=145825
TEST=cc_unittests and manual testing


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166298 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-06 23:26:51 +00:00
f6645beaac cc: Remove WebThread includes.
BUG=154451
TEST=cc_unittests
R=enne@chromium.org,jamesr@chromium.org


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166244 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-06 19:29:53 +00:00
3d89c79818 cc: Add impl-side painting command line switch.
This doesn't do anything yet.  It is assumed that ui/compositor will switch
over to using Layer directly and not WebLayer so that this switch will only
eventually affect the render process compositor.

This deliberately doesn't add an about:flags entry until this path is mildly
functional.

BUG=155209

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166240 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-06 19:15:07 +00:00
7a573a4e70 The FPS counter displays the framerate in the compositor's HUD layer. This change allows for toggling the FPS counter without using the '--show-fps-counter' command-line flag.
WebKit side: https://bugs.webkit.org/show_bug.cgi?id=99660

BUG=154754

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166233 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-06 18:28:24 +00:00
dfb6123c0b Android: fixes copyright for cc/nine_patch_layer_unittest.cc.
The FYI bot step "Check licenses for WebView" is broken.

BUG=
TEST=android fyi bot is green


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166232 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-06 18:25:49 +00:00
66dce29b1a Fixed tile filtering for the software compositor.
Also switched to using drawBitmapRectToRect instead of drawBitmapRect since
it takes floating point rects as parameters.

Now

platform/chromium/virtual/softwarecompositing/visibility/visibility-image-layers.html

is rendering correctly (minus filtering differences between Mesa and Skia).


BUG=124671

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166178 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-06 09:12:00 +00:00
35680c0ca7 cc: Nine patch layer.
Review URL: https://chromiumcodereview.appspot.com/11304020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166154 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-06 05:53:00 +00:00
af97816e82 this change improves the following points of the FPS counter:
-cleaner design: less colors, text arranged above the graph, deviation number right aligned 
-added transparency: FPS counter does not completely cover the webpage
-less frequent number updates: makes the numbers easier to read
-indicator line at 60fps

comparison images: https://docs.google.com/folder/d/0B8Y78t3tjy1XZk1xdWx6VjN5aFE/edit

Please download the patch and provide a screenshot from your system to test the layout.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166041 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-05 21:48:15 +00:00
c9c1ebe247 cc: Remove all remaining use of WebCore Rect/Point/Size types from the compositor.
This change removes all IntPoint/FloatRect/IntSize/etc from the compositor.
There remains an indirect dependency on these types through the
WebCore::Region class, which we wrap but need to replace. However, the wrapper
there hides the WebCore types inside it, so there are now no references to the
types from anywhere else in the compositor.

I went back and forth on how to deal with scroll "positions". The name suggested
that they should be Points, and that the deltas should be Vectors. However this
lent itself to super awkward math at times. In the end, it was much cleaner to
make all scroll "positions" into scroll "offsets" and represent everything as
Vectors.

Covered by existing tests; no change in behaviour.

R=enne
BUG=147395
Relanding: https://codereview.chromium.org/11367080/

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166027 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-05 20:46:13 +00:00
bc5e77c1c4 cc: Fix style for comments at the end of namespaces
Make sure we have a comment at the end of the namespace for each .cc file and
that there are two spaces between the closing brace and the comment.

R=enne


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166005 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-05 20:00:49 +00:00
cf817fb1ed Revert "cc: Remove all remaining use of WebCore Rect/Point/Size types from the compositor."
This reverts commit a76cb24ab8de742f70b83f6c045c2c23545eaae7.

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165949 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-05 17:17:34 +00:00
ec454716d4 cc: Remove all remaining use of WebCore Rect/Point/Size types from the compositor.
This change removes all IntPoint/FloatRect/IntSize/etc from the compositor.
There remains an indirect dependency on these types through the
WebCore::Region class, which we wrap but need to replace. However, the wrapper
there hides the WebCore types inside it, so there are now no references to the
types from anywhere else in the compositor.

I went back and forth on how to deal with scroll "positions". The name suggested
that they should be Points, and that the deltas should be Vectors. However this
lent itself to super awkward math at times. In the end, it was much cleaner to
make all scroll "positions" into scroll "offsets" and represent everything as
Vectors.

Covered by existing tests; no change in behaviour.

R=enne
BUG=147395

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165947 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-05 16:56:49 +00:00
068d7ef6ae A speculative Revert for r165872 - Remove static thread pointers from CC, attempt 2
BUG=152904

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

TBR=aelias@chromium.org
Review URL: https://codereview.chromium.org/11369071

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165907 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-05 07:17:46 +00:00
8fcbaa37a2 cc: Fix header include guards of our header files.
Fixed with a hacky python script :/

BUG=144576,144577
TEST=$ cpplint.py cc/*.h 2>&1 | grep header_guard. And verified it doesn't complain.
R=enne@chromium.org,jamesr@chromium.org


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165895 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-05 04:12:41 +00:00
de6b07ebe5 cc: Get rid of FloatToSkScalar() function.
Accordding to Dana:
"We can probably just call SkFloatToScalar directly in those sites.
Those values should never be NaN or infinity."

BUG=147395
TEST=cc_unittests
R=enne@chromium.org,danakj@chromium.org
NOTRY=true


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165889 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-05 01:51:39 +00:00
db79992121 Remove static thread pointers from CC, attempt 2
BUG=152904

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165872 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-04 03:25:55 +00:00
45cac47d9e Add more cc owners
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165862 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-03 21:10:11 +00:00
8e504a0c40 cc: Remove FloatQuad.h stub header file.
Looks like Dana forgot to remove it in https://codereview.chromium.org/11364044/,
r165735

BUG=147395
R=danakj@chromium.org
TBR=enne@chromium.org
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165861 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-03 20:52:43 +00:00
2b37dfda89 cc: Move textureUploadFlushPeriod to TextureUploader.
This moves texture upload related flushing to the TextureUploader
class. This is a more appropriate place to handle this type of flushing
and makes it possible to avoid some unnecessary flushes.

BUG=
TEST=cc_unittests


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165860 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-03 20:52:32 +00:00
843552f0c3 cc: Get rid of threaded_test.h.
This seems to have been left in a past revision.

R=enne@chromium.org,jamesr@chromium.org
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165857 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-03 16:55:16 +00:00
857ace8d77 Separate TransferableResource into own header
This is so that we can write the picklers without having to include webcore/wtf.
This also changes the resource transfer functions to avoid copies.

BUG=146080


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165847 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-03 07:10:22 +00:00
0d8a305091 cc: Remove WebCore rect use from the compositor, except within Region.
This replaces the last cases of FloatRect with gfx::RectF. It depends on the
IsExpressibleAsRect() method in https://codereview.chromium.org/11364054/ and
removes the stubs as well!

We add an API to the Region class that is intended to be our final Region
class interface. It uses an iterator to walk the rects in the Region, which is
compatible with the SkRegion API, but can also hide the IntRects exposed by the
WebCore Region API.

Once this is done, there is no need to use cc::IntRect, and we can remove it
entirely.

Covered by existing tests; no change in behaviour.

BUG=147395
R=enne

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165837 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-03 02:59:15 +00:00
a5dd3e1b6e Fix mac warnings after making cc a component
BUG=154052


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165834 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-03 02:41:53 +00:00
4641c96ec6 cc: Remove other entries from DEPS list.
They were also fixed in past revisions, now that cc component landed and the
TillingData landed to, we can remove them.

BUG=147395,154052
TEST=checkdeps.py succeeds.
R=enne@chromium.org,jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165805 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-03 00:08:31 +00:00
1ca411a71e cc: Remove some entries from DEPS list.
This appears to have been fixed in past revisions so we can remove them now.

TEST=run checkdeps.py, it should succeed.
R=enne@chromium.org,jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165758 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-02 21:46:26 +00:00
52347c8482 Make cc a component
BUG=154052

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165748 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-02 21:06:20 +00:00
075ae0349a cc: Replace WebCore::FloatQuad with gfx::QuadF.
It does as it says it does. This depends on the QuadF CL found at
https://codereview.chromium.org/11369043/ and is just search/replace
after that, as I added all the equivalent functionality to QuadF that
we made use of on FloatQuad.

It is possible we may see some slight differences in behaviour from using
FloatQuad, as we should benefit from increased precision, using doubles after
multiplying floats, when using Contains(Point) or IsCounterClockwise().

Covered by existing tests; no dramatic change in behaviour.

R=enne
BUG=147395

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165735 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-02 20:02:41 +00:00
8a03518ab1 Create cc::TilingData based on WebCore::TilingData.
This is a direct port of the TilingData class from the WebKit repo, found in:
Source/WebCore/platform/graphics/gpu/TilingData.h|cpp

Previous commits from non-google folks have been:
- ossy replacing the non-copyable macro (which is not present here).
- hyatt replacing right()/bottom() with maxX()/maxY() (we use right()/bottom() again here, with gfx::Rect instead of IntRect).
- mitz using ASSERT_UNUSED instead of ASSERT guarded on NDEBUG (we use DCHECK instead here).

Covered by existing tests; this replaces the use of WebCore::TilingData with the new cc::TilingData.

R=enne
BUG=147395

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165681 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-02 15:37:41 +00:00
f355ed2c91 cc: Get rid of NotImplemented stub file.
BUG=147395
R=enne@chromium.org,jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165679 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-02 15:09:06 +00:00
f996ed4f88 cc: Sort the source_file list alphabetical.
R=enne@chromium.org,jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165668 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-02 12:19:30 +00:00
71bdee314f cc: Update README file.
Remove old instructions.

R=jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165664 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-02 12:08:11 +00:00
a3d2445a0e cc: Avoid using upload term in relation to resources.
Rename ResourceProvider::upload() to ResourceProvider::setPixels() and
PrioritizedTexture::upload() to PrioritizedTexture::setPixels().

BUG=
TEST=cc_unittests


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165632 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-02 06:26:24 +00:00
d455d55745 Remove most remaining webcore points and sizes.
The remaining sizes should all be becoming vectors. Some or all of the
remaining points should as well.

The only Int/Float Point/Size types left are in the scrolling and page scaling
code, or in the LayerTilingData.

R=enne
BUG=147395

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165569 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-02 00:19:06 +00:00
d0f98369e6 Remove most remaining references to IntRect and FloatRect.
The remaining uses are:
- Dealing with the output of Region::rects() which gives a vector of
  WebCore::IntRects.
- Using FloatRect::isExpressibleAsIntRect.

Covered by existing tests; no new behaviour.

BUG=147395
R=enne

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165542 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-01 23:02:38 +00:00
5bc29a2dab Revert 165476 - Remove static thread pointers from CC
Might be causing webkit_unit_tests to fail on mac/win

BUG=152904

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

TBR=jamesr@chromium.org

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165501 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-01 21:21:59 +00:00
4eb8a378db cc: Switch from WebCore::FloatPoint3D to gfx::Point3F and gfx::Vector3dF in the compositor
This entirely removes our usage of FloatPoint3D, and removes the stub header as
well.

Covered by existing tests; just changing data types.

This depends on https://codereview.chromium.org/11367025/

BUG=147395
R=enne

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165484 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-01 20:16:56 +00:00
b375853a5b Remove static thread pointers from CC
BUG=152904

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165476 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-01 19:48:47 +00:00
aad0a007e1 cc: Use gfx:: Geometry types for positions, bounds, and related things.
This covers layers, layer tree hosts, and related classes. *phew*

I intentionally avoided anything to do with scrolling or page scale. Those
should be changed to be Vectors and need a bit more thought. This change
should be pretty mindless.

It converts to gfx Rect, Size, Vector, and Point classes. No change is
made for FloatPoint3D or FloatQuad yet.

I've added cc/geometry.h as a place for free functions that don't exist
on gfx types yet, and that we should port over in the future.

No change in behaviour; covered by existing tests.

BUG=147395
R=enne

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165434 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-01 18:15:58 +00:00
d7dacc349f cc: Use base::Passed in ThreadProxy
R=jamesr@chromium.org
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165428 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-01 17:58:12 +00:00
7e3b68e46d cc: Pass gfx::Size type to FontAtlas drawText() function.
BUG=147395
TEST=cc_unittests
R=danakj@chromium.org, enne@chromium.org, jamesr@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165276 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-01 01:15:36 +00:00
904e9138fb Pass accurate contentsScale to LayerImpl.
This is the first part of fixing fuzzy content issue in composited layers in
scaled pages.

There are two reasons of fuzzy content:

1) Inaccurate scale: The scale in transformation is calculated with
     contentBounds.width / bounds.width
     contentBounds.height / bounds.height
   in layer_tree_host_common.cc and other places.
   However, contentBounds is a IntSize which is calculated from bounds
   and contentsScale in layer.cc:
     IntRect(lroundf(bounds.width * contentsScale),
             lroundf(bounds.height * contentsScale))
   This causes the scale like 0.993 or 1.007 in the drawTransformation etc.
   where identity transformation is expected.

   To resolve the issue, instead of calculating scale using contentBounds,
   pass the accurate contentsScale from Layer to LayerImpl.

2) Pixel on surfaces are not aligned. Will describe this in the CL for the
   second part.

(See https://bugs.webkit.org/show_bug.cgi?id=84187 for more details).

Change-Id: I8f59f0460e1b212223e2c8c551b4127d8239e5cc

BUG=bugs.webkit.org/show_bug.cgi?id=84187
TEST=ContentsScalingLayerTest.checkContentBounds, LayerTreeHostCommonTest.verifyLayerTransformsInHighDPIAccurateScaleZeroPosition, LayerTreeHostCommonTest.verifyRenderSurfaceTransformsInHighDPIAccurateScaleZeroPosition


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165269 0039d316-1c4b-4281-b951-d872f2087c98
2012-11-01 00:12:47 +00:00