|
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
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=149384
Total comments: 6
Total comments: 7
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+241 lines, -68 lines) |
Patch |
|
M |
LayoutTests/TestExpectations
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/canvas/alpha.html
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/canvas/alpha.js
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+52 lines, -0 lines |
0 comments
|
Download
|
|
A |
LayoutTests/fast/canvas/alpha-expected.txt
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+35 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/WebKit/chromium/public/WebRuntimeFeatures.h
|
View
|
1
2
3
4
5
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
|
View
|
1
2
3
4
5
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/WebKit/chromium/tests/Canvas2DLayerBridgeTest.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/WebKit/chromium/tests/Canvas2DLayerManagerTest.cpp
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/bindings/v8/custom/V8HTMLCanvasElementCustom.cpp
|
View
|
1
2
3
4
5
|
3 chunks |
+12 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/core.gypi
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLCanvasElement.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
5 chunks |
+8 lines, -6 lines |
0 comments
|
Download
|
|
A + |
Source/core/html/canvas/Canvas2DContextAttributes.h
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+18 lines, -19 lines |
0 comments
|
Download
|
|
A + |
Source/core/html/canvas/Canvas2DContextAttributes.cpp
|
View
|
1
2
3
|
2 chunks |
+20 lines, -9 lines |
0 comments
|
Download
|
|
A + |
Source/core/html/canvas/Canvas2DContextAttributes.idl
|
View
|
1
2
3
4
|
2 chunks |
+3 lines, -9 lines |
0 comments
|
Download
|
|
M |
Source/core/html/canvas/CanvasContextAttributes.h
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/html/canvas/CanvasRenderingContext.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/html/canvas/CanvasRenderingContext2D.h
|
View
|
1
2
3
4
5
6
7
8
9
|
6 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/html/canvas/CanvasRenderingContext2D.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
3 chunks |
+10 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/html/canvas/CanvasRenderingContext2D.idl
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/page/RuntimeEnabledFeatures.h
|
View
|
1
2
3
4
5
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/page/RuntimeEnabledFeatures.cpp
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
Source/core/platform/graphics/ImageBuffer.h
|
View
|
1
2
3
|
2 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/platform/graphics/chromium/Canvas2DLayerBridge.h
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+8 lines, -3 lines |
0 comments
|
Download
|
|
M |
Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/platform/graphics/skia/ImageBufferSkia.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
6 chunks |
+11 lines, -7 lines |
0 comments
|
Download
|
|
M |
Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
Total messages: 13 (0 generated)
|