Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Issue 11745018: Not for review: Move the implementation of WebTransformOperations into chromium (Closed)

Created:
7 years, 11 months ago by ajuma
Modified:
7 years, 11 months ago
Reviewers:
Ian Vollick, jamesr
CC:
chromium-reviews, cc-bugs_chromium.org, darin-cc_chromium.org, Ian Vollick
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Not for review: Move the implementation of WebTransformOperations into chromium This will actually need to land as multiple CLs, but posting this since seeing the overall result makes it easier to discuss the intermediate steps. The overall result is: 1) A new class WebTransformOperationsImpl, in webkit/compositor_bindings, implements WebTransformOperations using an instance of a new class, cc::TransformOperations. 2) The WebTransformOperations interface is reduced to just the subset that WebKit needs. 3) WebCompositorSupportImpl provides createTransformOperations methods. 4) cc no longer needs to know anything about WebTransformOperations. All usage of WebTransformOperations within cc is replaced by usage of cc::TransformOperations. 5) cc::TransformOperations still uses WebKit::WebTransformationMatrix, but this can be replaced with gfx::Transform in a follow-up CL. The plan is to get to this overall result via the following steps: 1) (chromium) Port the existing WebKit::WebTransformOperations to a new class, cc::TransformOperations. For all existing usage of WebTransformOperations inside cc, add code to use cc::TransformOperations instead, but put this new code behind #if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL. In webkit/compositor_bindings, define a new class WebTransformOperationsImpl that implements WebTransformOperations using an instance of cc::TransformOperations, but put this class behind #if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL. Also, define WebCompositorSupportImpl::createTransformOperations, that returns an instance of WebTransformOperationsImpl. For all existing usage of WebTransformOperations inside webkit/compositor_bindings, add code (behind #if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL) to use WebTransformOperationsImpl instead, extracting the underlying cc::TransformOperations before calling into cc. 2) (WebKit) Make WebTransformOperations pure virtual, and remove methods that are not used by WebKit. Define WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL. Add a createTransformOperations method to WebCompositorSupport. 3) (chromium) Remove code behind the #else branch of all the #if WEB_TRANSFORM_OPERATIONS_IS_VIRTUAL checks. BUG=166640

Patch Set 1 #

Patch Set 2 : New approach #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+1317 lines, -737 lines) Patch
M cc/cc.gyp View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cc/cc_tests.gyp View 1 1 chunk +1 line, -0 lines 0 comments Download
M cc/keyframed_animation_curve.h View 2 chunks +5 lines, -5 lines 0 comments Download
M cc/keyframed_animation_curve.cc View 1 4 chunks +6 lines, -6 lines 0 comments Download
M cc/keyframed_animation_curve_unittest.cc View 1 5 chunks +21 lines, -21 lines 0 comments Download
M cc/test/animation_test_common.cc View 1 2 chunks +5 lines, -5 lines 0 comments Download
A cc/transform_operations.h View 1 1 chunk +74 lines, -0 lines 0 comments Download
A cc/transform_operations.cc View 1 1 chunk +383 lines, -0 lines 3 comments Download
A cc/transform_operations_unittest.cc View 1 1 chunk +603 lines, -0 lines 0 comments Download
M webkit/compositor_bindings/compositor_bindings.gyp View 1 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/compositor_bindings/compositor_bindings_tests.gyp View 1 1 chunk +0 lines, -1 line 0 comments Download
M webkit/compositor_bindings/web_compositor_support_impl.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M webkit/compositor_bindings/web_compositor_support_impl.cc View 1 4 chunks +7 lines, -0 lines 0 comments Download
M webkit/compositor_bindings/web_transform_animation_curve_impl.cc View 1 2 chunks +8 lines, -2 lines 0 comments Download
M webkit/compositor_bindings/web_transform_animation_curve_unittest.cc View 1 14 chunks +88 lines, -87 lines 0 comments Download
A webkit/compositor_bindings/web_transform_operations_impl.h View 1 1 chunk +45 lines, -0 lines 0 comments Download
A webkit/compositor_bindings/web_transform_operations_impl.cc View 1 1 chunk +64 lines, -0 lines 0 comments Download
M webkit/compositor_bindings/web_transform_operations_unittest.cc View 1 1 chunk +0 lines, -610 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
ajuma
7 years, 11 months ago (2013-01-05 20:38:31 UTC) #1
ajuma
jamesr@, what do you think about the overall approach?
7 years, 11 months ago (2013-01-08 21:15:31 UTC) #2
jamesr
On 2013/01/08 21:15:31, ajuma wrote: > jamesr@, what do you think about the overall approach? ...
7 years, 11 months ago (2013-01-08 21:59:22 UTC) #3
jamesr
On 2013/01/08 21:59:22, jamesr wrote: > On 2013/01/08 21:15:31, ajuma wrote: > > jamesr@, what ...
7 years, 11 months ago (2013-01-08 22:11:00 UTC) #4
ajuma
On 2013/01/08 22:11:00, jamesr wrote: > Note: Another way to handle this bit would be ...
7 years, 11 months ago (2013-01-14 14:51:28 UTC) #5
jamesr
You're missing several #ifdefs, but this looks reasonable. I assume you're still working on making ...
7 years, 11 months ago (2013-01-14 22:03:00 UTC) #6
ajuma
On 2013/01/14 22:03:00, jamesr wrote: > You're missing several #ifdefs, but this looks reasonable. I ...
7 years, 11 months ago (2013-01-15 00:45:06 UTC) #7
jamesr
On 2013/01/15 00:45:06, ajuma wrote: > On 2013/01/14 22:03:00, jamesr wrote: > > You're missing ...
7 years, 11 months ago (2013-01-15 06:16:18 UTC) #8
Ian Vollick
7 years, 11 months ago (2013-01-15 15:02:38 UTC) #9
https://chromiumcodereview.appspot.com/11745018/diff/5001/cc/transform_operat...
File cc/transform_operations.cc (right):

https://chromiumcodereview.appspot.com/11745018/diff/5001/cc/transform_operat...
cc/transform_operations.cc:15: const double EPSILON = 1e-4;
On 2013/01/14 22:03:00, jamesr wrote:
> use chromium style kEpsilon
> 
> it's pretty weird for this file to declare its own epsilon - why?

I used this epsilon when checking if two rotations used the same axis. The
allowable error there is pretty big, much bigger than
numeric_limits<double>::epsilon, etc. Perhaps this constant should have a more
explicit name like kAngleEpsilon?

Powered by Google App Engine
This is Rietveld 408576698