Bug 112605 - [Chromium] Code cleanup: removing support for non-deferred 2d canvas rendering
Summary: [Chromium] Code cleanup: removing support for non-deferred 2d canvas rendering
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Justin Novosad
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-18 11:52 PDT by Justin Novosad
Modified: 2013-03-20 09:01 PDT (History)
16 users (show)

See Also:


Attachments
Patch (38.07 KB, patch)
2013-03-18 11:57 PDT, Justin Novosad
no flags Details | Formatted Diff | Diff
Patch (38.08 KB, patch)
2013-03-18 12:17 PDT, Justin Novosad
no flags Details | Formatted Diff | Diff
Patch (38.15 KB, patch)
2013-03-18 12:38 PDT, Justin Novosad
no flags Details | Formatted Diff | Diff
Patch (40.41 KB, patch)
2013-03-20 06:58 PDT, Justin Novosad
no flags Details | Formatted Diff | Diff
Patch for landing (40.41 KB, patch)
2013-03-20 07:00 PDT, Justin Novosad
no flags Details | Formatted Diff | Diff
Patch for landing (40.26 KB, patch)
2013-03-20 07:36 PDT, Justin Novosad
no flags Details | Formatted Diff | Diff
Patch for landing (40.29 KB, patch)
2013-03-20 07:49 PDT, Justin Novosad
no flags Details | Formatted Diff | Diff
Patch for landing (40.31 KB, patch)
2013-03-20 07:51 PDT, Justin Novosad
no flags Details | Formatted Diff | Diff
Patch for landing (40.31 KB, patch)
2013-03-20 08:11 PDT, Justin Novosad
no flags Details | Formatted Diff | Diff
Patch for landing (40.29 KB, patch)
2013-03-20 08:25 PDT, Justin Novosad
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Novosad 2013-03-18 11:52:32 PDT
[Chromium] Code cleanup: removing support for non-deferred 2d canvas rendering
Comment 1 Justin Novosad 2013-03-18 11:57:55 PDT
Created attachment 193622 [details]
Patch
Comment 2 James Robinson 2013-03-18 12:08:09 PDT
Patch doesn't seem to apply, could you rebase?

Will this flip behavior for layout tests?
Comment 3 Justin Novosad 2013-03-18 12:17:00 PDT
Created attachment 193626 [details]
Patch
Comment 4 WebKit Review Bot 2013-03-18 12:18:26 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 5 Justin Novosad 2013-03-18 12:23:19 PDT
(In reply to comment #2)
> Patch doesn't seem to apply, could you rebase?
> 
> Will this flip behavior for layout tests?

The GPU bots are currently running with deferred 2d canvas rendering enabled, so they will not be affected by this change.  The non-GPU layout tests are not affected because deferred rendering is only implemented for GPU-accelerated canvases.
Comment 6 Stephen White 2013-03-18 12:23:47 PDT
Comment on attachment 193626 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=193626&action=review

> Source/WebCore/platform/graphics/chromium/Canvas2DLayerBridge.cpp:48
> +    : m_backBufferTexture(textureId)

Nit:  We should keep an eye on the name of this member var, and make sure it makes sense (it doesn't really make sense right now, since we only have a single buffer, but Justin tells me more will be reimplemented soon.)
Comment 7 Justin Novosad 2013-03-18 12:38:54 PDT
Created attachment 193629 [details]
Patch
Comment 8 Justin Novosad 2013-03-18 12:46:25 PDT
(In reply to comment #7)
> Created an attachment (id=193629) [details]
> Patch

New Patch adds NULL ptr checks on m_canvas in Canvas2DLayerBridge.cpp to fix crashing unit tests.

FWIW: This patch is just clearing the path for a deeper re-arch of Canvas2DLayerBridge to support the Mailboxes for communicating with the ubercompositor.  Support for legacy non-deferred 2d canvas rendering was adding a lot of complexity that does not need to be a part of the upcoming re-design.
Comment 9 James Robinson 2013-03-18 13:10:08 PDT
(In reply to comment #5)
> (In reply to comment #2)
> > Patch doesn't seem to apply, could you rebase?
> > 
> > Will this flip behavior for layout tests?
> 
> The GPU bots are currently running with deferred 2d canvas rendering enabled, so they will not be affected by this change.  The non-GPU layout tests are not affected because deferred rendering is only implemented for GPU-accelerated canvases.

All of the layout test bots run the platform/chromium/virtual/gpu/(fast/canvas|canvas/philip) tests through the GPU path (backed by osmesa).  Will they change?
Comment 10 Justin Novosad 2013-03-18 13:16:26 PDT
(In reply to comment #9)
> (In reply to comment #5)
> > (In reply to comment #2)
> > > Patch doesn't seem to apply, could you rebase?
> > > 
> > > Will this flip behavior for layout tests?
> > 
> > The GPU bots are currently running with deferred 2d canvas rendering enabled, so they will not be affected by this change.  The non-GPU layout tests are not affected because deferred rendering is only implemented for GPU-accelerated canvases.
> 
> All of the layout test bots run the platform/chromium/virtual/gpu/(fast/canvas|canvas/philip) tests through the GPU path (backed by osmesa).  Will they change?


I did not think they would change, but apparently this patch changes them because the chromium ews bots are detecting regression with this patch that went undetected until now. Not sure how come we are in this state. Investigating...
Comment 11 James Robinson 2013-03-18 13:25:18 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #5)
> > > (In reply to comment #2)
> > > > Patch doesn't seem to apply, could you rebase?
> > > > 
> > > > Will this flip behavior for layout tests?
> > > 
> > > The GPU bots are currently running with deferred 2d canvas rendering enabled, so they will not be affected by this change.  The non-GPU layout tests are not affected because deferred rendering is only implemented for GPU-accelerated canvases.
> > 
> > All of the layout test bots run the platform/chromium/virtual/gpu/(fast/canvas|canvas/philip) tests through the GPU path (backed by osmesa).  Will they change?
> 
> 
> I did not think they would change, but apparently this patch changes them because the chromium ews bots are detecting regression with this patch that went undetected until now. Not sure how come we are in this state. Investigating...

It sounds from what you're saying that they previous ran without deferred canvas but now are running with it.  I think running with the deferred mode enabled is better, since that's what we are shipping, but it's a difference.
Comment 12 WebKit Review Bot 2013-03-18 13:29:57 PDT
Comment on attachment 193629 [details]
Patch

Attachment 193629 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://webkit-commit-queue.appspot.com/results/17160577

New failing tests:
platform/chromium/virtual/gpu/canvas/philip/tests/2d.gradient.radial.cone.beside.html
platform/chromium/virtual/gpu/canvas/philip/tests/2d.gradient.radial.cone.shape1.html
platform/chromium/virtual/gpu/canvas/philip/tests/2d.gradient.radial.cone.behind.html
platform/chromium/virtual/gpu/canvas/philip/tests/2d.gradient.radial.cone.shape2.html
platform/chromium/virtual/gpu/canvas/philip/tests/2d.gradient.radial.touch3.html
platform/chromium/virtual/gpu/canvas/philip/tests/2d.gradient.radial.touch1.html
Comment 13 Justin Novosad 2013-03-18 14:07:46 PDT
(In reply to comment #11)

> 
> It sounds from what you're saying that they previous ran without deferred canvas but now are running with it.  I think running with the deferred mode enabled is better, since that's what we are shipping, but it's a difference.

Exactly.  After taking a look at content/shell/webkit_test_controller.cc (in chromium), it appears that we were only enabling deferred mode for tests in the "compositing/" directory.  And this has only been the case since 2 months ago: http://src.chromium.org/viewvc/chrome?view=rev&revision=177509

I had a patch to enable it by default in DRT. I thought I submitted it, but it looks like it fell through the cracks: https://bugs.webkit.org/show_bug.cgi?id=92525

The failing LayoutTests are not failing in the browser. Only in DRT.  Not sure what is happening. Perhaps skia is generating shader code that is not compatible with mesa for the radial gradient effect?

I suggest submitting this CL with the new failures flagged in TestExpectations, and I'll file a separate bug for the newly detected failures.  Does that sound right?
Comment 14 James Robinson 2013-03-18 14:29:01 PDT
I think it'd be useful to repro the failures and figure out where they are coming from.  What's the diff?
Comment 15 Justin Novosad 2013-03-19 12:49:44 PDT
(In reply to comment #14)
> I think it'd be useful to repro the failures and figure out where they are coming from.  What's the diff?

Bug isolated. Looks like the regression came from skia in the 5594-5633 range

Filed a bug: https://code.google.com/p/chromium/issues/detail?id=222140
Comment 16 James Robinson 2013-03-19 13:02:35 PDT
OK - I'm find with marking them as failing in TestExpectations with a link to that bug.
Comment 17 James Robinson 2013-03-19 16:18:12 PDT
Comment on attachment 193629 [details]
Patch

R=me, but be sure to update TestExpectations before landing.  You may want to ask Stephen to take a look as well.
Comment 18 Justin Novosad 2013-03-20 06:58:49 PDT
Created attachment 194044 [details]
Patch
Comment 19 Justin Novosad 2013-03-20 07:00:03 PDT
Created attachment 194046 [details]
Patch for landing
Comment 20 WebKit Review Bot 2013-03-20 07:03:34 PDT
Comment on attachment 194046 [details]
Patch for landing

Rejecting attachment 194046 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 194046, '--port=chromium-xvfb']" exit_code: 2 cwd: /mnt/git/webkit-commit-queue

Last 500 characters of output:
nderTree/chromium/TestShell.cpp.rej
patching file Tools/DumpRenderTree/chromium/TestShell.h
Hunk #1 FAILED at 121.
Hunk #2 FAILED at 218.
2 out of 2 hunks FAILED -- saving rejects to file Tools/DumpRenderTree/chromium/TestShell.h.rej
patching file LayoutTests/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/platform/chromium/TestExpectations

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue

Full output: http://webkit-commit-queue.appspot.com/results/17223377
Comment 21 Justin Novosad 2013-03-20 07:36:06 PDT
Created attachment 194051 [details]
Patch for landing
Comment 22 WebKit Review Bot 2013-03-20 07:40:16 PDT
Comment on attachment 194051 [details]
Patch for landing

Rejecting attachment 194051 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-02', 'validate-changelog', '--non-interactive', 194051, '--port=chromium-xvfb']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue

/mnt/git/webkit-commit-queue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://webkit-commit-queue.appspot.com/results/17122785
Comment 23 Justin Novosad 2013-03-20 07:49:18 PDT
Created attachment 194055 [details]
Patch for landing
Comment 24 Justin Novosad 2013-03-20 07:51:24 PDT
Created attachment 194057 [details]
Patch for landing
Comment 25 WebKit Review Bot 2013-03-20 07:54:03 PDT
Comment on attachment 194057 [details]
Patch for landing

Rejecting attachment 194057 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-04', 'validate-changelog', '--non-interactive', 194057, '--port=chromium-xvfb']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue

jamesr@chromium.org found in /mnt/git/webkit-commit-queue/LayoutTests/ChangeLog does not appear to be a valid reviewer according to committers.py.
/mnt/git/webkit-commit-queue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://webkit-commit-queue.appspot.com/results/17286012
Comment 26 Justin Novosad 2013-03-20 08:11:48 PDT
Created attachment 194062 [details]
Patch for landing
Comment 27 WebKit Review Bot 2013-03-20 08:20:45 PDT
Comment on attachment 194062 [details]
Patch for landing

Rejecting attachment 194062 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-01', 'validate-changelog', '--non-interactive', 194062, '--port=chromium-xvfb']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue

jamesr@chromium.org found in /mnt/git/webkit-commit-queue/LayoutTests/ChangeLog does not appear to be a valid reviewer according to committers.py.
/mnt/git/webkit-commit-queue/LayoutTests/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive).

Full output: http://webkit-commit-queue.appspot.com/results/17200467
Comment 28 Justin Novosad 2013-03-20 08:25:21 PDT
Created attachment 194066 [details]
Patch for landing
Comment 29 WebKit Review Bot 2013-03-20 09:01:32 PDT
Comment on attachment 194066 [details]
Patch for landing

Clearing flags on attachment: 194066

Committed r146351: <http://trac.webkit.org/changeset/146351>
Comment 30 WebKit Review Bot 2013-03-20 09:01:41 PDT
All reviewed patches have been landed.  Closing bug.