New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 8 users
Status: Fixed
Owner:
Closed: Oct 2013
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Launch-OWP
Launch-Accessibility: ----
Launch-Legal: ----
Launch-M-Approved: ----
Launch-M-Target: ----
Launch-Privacy: ----
Launch-Security: ----
Launch-Status: ----
Launch-Test: ----
Launch-UI: ----
Product-Review: ----



Sign in to add a comment
Canvas 2D Context Attributes { alpha: false }
Project Member Reported by senorblanco@chromium.org, Apr 22 2013 Back to list
Change description:

Allow the developer to specify a context attributes object to getContext('2d').  In particular, implement support for { alpha: false } to create an opaque canvas.  This is similar to existing WebGL functionality.

Changes to API surface:
- new optional 2nd parameter to canvas.getContext()
- new function:  context.getContextAttributes() to retrieve the context's attributes

WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=112628 (old)

WhatWG proposal is here:  http://wiki.whatwg.org/wiki/CanvasOpaque

Public standards discussion: http://lists.w3.org/Archives/Public/public-whatwg-archive/2013Feb/0062.html

Support in other browsers:
Internet Explorer: none (unknown)
Firefox: none (unknown), but has similar functionality under moz-opaque canvas attribute, and has expressed preliminary support
Safari: none (unknown)
Opera: none (unknown)
 
Project Member Comment 1 by bugdroid1@chromium.org, Apr 30 2013
------------------------------------------------------------------------
r149384 | senorblanco@chromium.org | 2013-04-29T23:30:37.178446Z

Changed paths:
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/alpha-expected.txt?r1=149384&r2=149383&pathrev=149384
   A http://src.chromium.org/viewvc/blink/trunk/Source/core/html/canvas/Canvas2DContextAttributes.h?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/canvas/CanvasRenderingContext.h?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/graphics/ImageBuffer.h?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/RuntimeEnabledFeatures.cpp?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/canvas/CanvasRenderingContext2D.idl?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/WebKit/chromium/tests/Canvas2DLayerManagerTest.cpp?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/canvas/CanvasContextAttributes.h?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/RuntimeEnabledFeatures.h?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/core.gypi?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/HTMLCanvasElement.cpp?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp?r1=149384&r2=149383&pathrev=149384
   A http://src.chromium.org/viewvc/blink/trunk/Source/core/html/canvas/Canvas2DContextAttributes.idl?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/canvas/CanvasRenderingContext2D.cpp?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp?r1=149384&r2=149383&pathrev=149384
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/alpha.html?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/canvas/CanvasRenderingContext2D.h?r1=149384&r2=149383&pathrev=149384
   A http://src.chromium.org/viewvc/blink/trunk/Source/core/html/canvas/Canvas2DContextAttributes.cpp?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/WebKit/chromium/tests/Canvas2DLayerBridgeTest.cpp?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/TestExpectations?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp?r1=149384&r2=149383&pathrev=149384
   A http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/canvas/alpha.js?r1=149384&r2=149383&pathrev=149384
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/platform/graphics/skia/ImageBufferSkia.cpp?r1=149384&r2=149383&pathrev=149384

This CL implements the first draft of Canvas 2D Context Attributes, aka getContext('2d', { alpha: false }).

See also WhatWG proposal http://wiki.whatwg.org/wiki/CanvasOpaque and OWP launch bug  http://crbug.com/234297 .

Canvas2DLayerBridge and ImageBuffer now have an opacityMode in their constructor, which indicates NonOpaque (the usual, RGBA buffer) or Opaque.
ImageBuffer will be cleared to opaque black instead of transparent black.  Canvas2DLayerBridge will also mark its compositing layer as opaque if set. CanvasRenderingContext2D creates its buffers as Opaque when the getContext() call includes { alpha: false }.

To avoid flag proliferation, this feature is protected by the new "experimental canvas features" flag, under which it and other not-ready-to-ship-by-default canvas features will be developed.

BUG= 234742 

Review URL: https://chromiumcodereview.appspot.com/14298018
------------------------------------------------------------------------
Project Member Comment 2 by bugdroid1@chromium.org, May 8 2013
Labels: -M-28 MovedFrom-28 M-29
Moving all non essential bugs to the next Milestone.
Project Member Comment 3 by bugdroid1@chromium.org, May 24 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=151057

------------------------------------------------------------------------
r151057 | caseq@google.com | 2013-05-24T08:33:47.672502Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/TimelinePanel.js?r1=151057&r2=151056&pathrev=151057

Timeline: fix switching from Events to Frame mode

We create frame controller after a call to repopulateRecords(),
so it may batch-pull all records from model. If repopulateRecords()
calls refresh synchronously, refresh() does not have frame controller and
does not render frame bars.

BUG= 234297 
R=loislo@chromium.org

Review URL: https://codereview.chromium.org/15755008
------------------------------------------------------------------------
Comment 4 by meh@chromium.org, Jun 21 2013
Did this land in 29?
Yes, it's in 29, but behind the "experimental canvas features" flag.
Comment 6 by meh@chromium.org, Jun 21 2013
Labels: -M-29 M-30
Er, I guess I was actually wondering if it would be shipping enabled-by-default.  Moving to M-30 for now.
Comment 7 by meh@chromium.org, Aug 15 2013
Labels: -M-30 M-31
Moving to M-31.  Let me know if it's enabled by default in M-30.
Labels: -OWP-LaunchBug-Needed -MovedFrom-28 Cr-Blink-Canvas
Project Member Comment 9 by bugdroid1@chromium.org, Sep 23 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=158196

------------------------------------------------------------------------
r158196 | senorblanco@chromium.org | 2013-09-23T18:11:32.633858Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/canvas/CanvasRenderingContext2D.idl?r1=158196&r2=158195&pathrev=158196
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/HTMLCanvasElement.cpp?r1=158196&r2=158195&pathrev=158196
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/html/canvas/Canvas2DContextAttributes.idl?r1=158196&r2=158195&pathrev=158196

Remove canvas 2D context attributes from behind experimental canvas features flag.

BUG= 234297 

Review URL: https://chromiumcodereview.appspot.com/23961011
------------------------------------------------------------------------
Argh, Stephen this missed the M31 branch by 4 measly Blink revisions according to http://omahaproxy.appspot.com/. I think we can merge, yeah?
:(

Yeah, it looks like it did miss. I've tagged the implementation bug (234742) with the above rev (r158196) and requested a merge there.
Labels: -M-31 M-32
Status: Fixed
This is on by default in M32. Closing.
Sign in to add a comment