| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
These unit tests and wrappers have a short-term home in MathUtil so that we can
safely migrate from WebTransformationMatrix to gfx::Transform in a follow-up
patch. After the migration, we will then proceed to phase out this temporary
code and beef up ui/gfx/transform.h nicely.
BUG=159972
Review URL: https://codereview.chromium.org/11316043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168571 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Ding, dong...
BUG=154451
Review URL: https://chromiumcodereview.appspot.com/11410021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167071 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds +/- operators to gfx::Rect that are applied to its origin Point.
Removes gfx::Point method a.OffsetFrom(b) in favor of (b - a).
Begin use +/- instead of Offset() in ui/gfx/ and cc/
New tests:
ui_unittests:RectTest.Offset
R=pkasting,enne
BUG=158416
Review URL: https://codereview.chromium.org/11293194
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167012 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mapHomgenousPoint is not cheap. We can do faster in projectClippedRect similar
to mapClippedRect.
rectSubtractRegion constructs a Region to do subtraction from. If the
subtraction's rvalue is empty, then there is nothing to do and we can
avoid creating a Region structure at all.
I measured time spent in calculateRenderPasses with a draw-heavy unit test.
Baseline: 0.001148 seconds
With these changes: 0.001116 seconds
So, about 3% reduction in time spent in calculateRenderPasses.
R=enne
BUG=159718
Review URL: https://chromiumcodereview.appspot.com/11312154
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166841 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WebCore::Region.
We create a class in cc/ called Region which provides a gfx:: type-friendly API
to SkRegion, and allows for easily swapping out region implementations in the
future if required.
During the process, I removed tests dependency on a "size()" method on Region,
that used to give the number of rects in the Region's internal representation.
Instead, we always create a Region in the tests from our expected rects, and
compare the Regions directly. We use ToString() comparisons to get useful
failure outputs, similar to the unit tests of other geometry types in ui/gfx.
This uncovered a WTF::Vector holdout in the OcclusionTracker class, which is
converted to a std::vector.
Covered by existing tests; no change in behaviour.
R=enne
BUG=147395
Review URL: https://chromiumcodereview.appspot.com/11366094
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@166617 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
the compositor."
This reverts commit a76cb24ab8de742f70b83f6c045c2c23545eaae7.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165949 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This depends on the non-mutating methods for Rect operations: https://codereview.chromium.org/11270042/
Covered by existing tests, just changing data types.
BUG=147395
R=enne
Review URL: https://codereview.chromium.org/11272045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165220 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
at the right resolution.
Currently the transform does not affect the scale of a layer's contents. This
means that when a layer with a scale on it becomes composited, its text is
rendered at 1x and then scaled up during rendering, which makes for very fuzzy
text.
This change applies the scale from the layer's CSS transform to the
contentsScale so that text is rendered at the same pixel resolution
as it will be drawn on screen.
Tests:
cc_unittests:CCLayerTreeHostCommonTest.verifyContentsScale
cc_unittests:CCLayerTreeHostCommonTest.verifyContentsScaleForSurfaces
BUG=149943
R=enne
Review URL: https://codereview.chromium.org/11230033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163873 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed reland of https://chromiumcodereview.appspot.com/11189043/
TBR=jam@chromium.org,jamesr@chromium.org
BUG=155413
Review URL: https://codereview.chromium.org/11231054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163429 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=155413
TEST=cc_unittests
R=enne@chromium.org,jamesr@chromium.org
TBR=jamesr@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11233025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163225 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
This reverts commit 184fac5add06d5f4670fa6be4a4d3b39232d51bb.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163059 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=155413
Review URL: https://codereview.chromium.org/11189043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163052 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can't compile-guard code and use DCHECK since it can be enabled at runtime. So we guard the DCHECKs that we want to rely on conditionally-compiled code in !NDEBUG compile guards.
This also replaces use of LOG_ERROR("Foo") with LOG(ERROR)<<"Foo";
This was previously discussed and committed as https://codereview.chromium.org/11048044/
using a guard based on LOGGING_IS_OFFICIAL_BUILD, however this was not sufficient since there are build configurations that are official builds but have dchecks compiled.
R=enne
Review URL: https://codereview.chromium.org/11192030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162739 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 162296. (https://chromiumcodereview.appspot.com/11048044)
TBR=danakj@chromium.org
Review URL: https://codereview.chromium.org/11196014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162297 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We can't compile-guard code and use DCHECK since it can be enabled at runtime.
This removes all compile-time guards, and makes use of DCHECK instead of ASSERT. We use DCHECK_IS_ON() to early out and avoid extra work just for DCHECK where possible as well.
This also replaces use of LOG_ERROR("Foo") with LOG(ERROR)<<"Foo";
R=enne,jamesr
Review URL: https://chromiumcodereview.appspot.com/11048044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162296 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=155413
TEST=cc_unittests
R=enne@chromium.org,jamesr@chromium.org
Review URL: https://codereview.chromium.org/11145033
TBR=tfarina@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162286 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=155413
TEST=cc_unittests
R=enne@chromium.org,jamesr@chromium.org
Review URL: https://codereview.chromium.org/11145033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162284 0039d316-1c4b-4281-b951-d872f2087c98
|
|
BUG=155413
Review URL: https://codereview.chromium.org/11122003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161671 0039d316-1c4b-4281-b951-d872f2087c98
|