This change is ready for review.
Patch set 5:Commit-Queue +1
To view, visit change 967252. To unsubscribe, or for help writing mail filters, visit settings.
I have issues with how a lot of the new identifiers are named. Otherwise, looks good.
16 comments:
File third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.h:
Patch Set #5, Line 158: Canvas2dBridge
I'd rather this be called GetCanvas2DLayerBridge (uses the class name)
Patch Set #5, Line 159: GetOrCreate2dLayerBridge
GetOrCreateCanvas2DLayerBridge
Patch Set #5, Line 160: GetOrCreateResourceProviderForWebGL
GetOrCreateCanvasResourceProviderForWebGL
Patch Set #5, Line 224: Create2dLayerBridgeForTesting
CreateCanvas2DLayerBridgeForTesting
Patch Set #5, Line 311: Create2dLayerBridgeInternal
CreateCanvas2DLayerBridgeInternal
Patch Set #5, Line 343: did_fail_to_allocate_image_resource_
The old name was better IMHO.
Patch Set #5, Line 345: HasImageResource
This should be calls HasResourceProvider. Canvas2DLayerBridge wraps a CanvasResourceProvider. The difference in terminology is important. A "Resource" refers to and individual image (CanvasResource), where as a "resource provider" is something that produces images (CanvasResourceProvider)
File third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.cpp:
Patch Set #5, Line 553: had_image_resource
had_resource_provider
Patch Set #5, Line 1182: DiscardImageResource
DiscardResourceProvider
File third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h:
Patch Set #5, Line 88: DiscardImageResource
DiscardResourceProvider
File third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp:
Patch Set #5, Line 234: DiscardImageResource
DiscardResourceProvider
File third_party/WebKit/Source/modules/canvas/canvas2d/BaseRenderingContext2D.h:
Patch Set #5, Line 231: virtual bool CanCreateCanvas2dResource() const = 0;
CanCreateCanvas2dResourceProvider
File third_party/WebKit/Source/modules/canvas/canvas2d/BaseRenderingContext2D.cpp:
Patch Set #5, Line 1596: hasImageResource
hasResourceProvider
Patch Set #5, Line 1673: hasImageResource
hasResourceProvider
Patch Set #5, Line 1719: ResourceProvider
I think you mean CanvasResourceProvider.
File third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.cpp:
Patch Set #5, Line 165: buffer2d
buffer2d -> layer_bridge
To view, visit change 967252. To unsubscribe, or for help writing mail filters, visit settings.
Mass renaming done.
Patch set 6:Commit-Queue +1
15 comments:
File third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.h:
Patch Set #5, Line 158: GetCanvas2DLay
I'd rather this be called GetCanvas2DLayerBridge (uses the class name)
Done
Patch Set #5, Line 159: dge_.get();
GetOrCreateCanvas2DLayerBridge
Done
GetOrCreateCanvasResourceProviderForWebGL
Done
Patch Set #5, Line 224: al void Trace(blink::Visitor*
CreateCanvas2DLayerBridgeForTesting
Done
CreateCanvas2DLayerBridgeInternal
Done
Patch Set #5, Line 343: buffered_input_ = false;
The old name was better IMHO.
Done
Patch Set #5, Line 345: prevents repeat
This should be calls HasResourceProvider. Canvas2DLayerBridge wraps a CanvasResourceProvider. […]
Done. To avoid confusion, I removed the ResourceProvider() function in HTMLCanvasElement.
File third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.cpp:
had_resource_provider
Done
DiscardResourceProvider
Done
File third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h:
Patch Set #5, Line 88: DiscardResourceProvi
DiscardResourceProvider
Done
File third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp:
Patch Set #5, Line 234: DiscardResourceProvi
DiscardResourceProvider
Done
File third_party/WebKit/Source/modules/canvas/canvas2d/BaseRenderingContext2D.h:
Patch Set #5, Line 231: virtual bool CanCreateCanvas2dResourceProvider() const = 0;
CanCreateCanvas2dResourceProvider
Done
File third_party/WebKit/Source/modules/canvas/canvas2d/BaseRenderingContext2D.cpp:
Patch Set #5, Line 1596: hasResourceProvi
hasResourceProvider
Done
Patch Set #5, Line 1673: hasResourceProvi
hasResourceProvider
Done
Patch Set #5, Line 1719: CanvasResourcePr
I think you mean CanvasResourceProvider.
Done
To view, visit change 967252. To unsubscribe, or for help writing mail filters, visit settings.
Patch set 6:Code-Review +1
Olivia Lai uploaded patch set #9 to this change.
Tidy up canvas code after ImageBuffer is removed
This CL cleans up code in canvas/OffscreenCanvas and their rendering contexts
in a world after ImageBuffer has been removed. It does the following:
- Renamed certain functions/variables to avoid misleading future readers.
- Split CreateImageBuffer into two functions, one for creating
Canvas2dLayerBridge in 2d context, another for creating resourceProvider for
webgl in webgl context. It was unnecessary and misleading to lump these two
unrelated operations together.
- Drive-by deletion of some unused code.
TBR=z...@chromium.org
Bug: 776806
Cq-Include-Trybots: luci.chromium.try:linux_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Id06026649894ddf20677f509296d87c5cfb4a5d6
---
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContextHost.h
M third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.cpp
M third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.h
M third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
M third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
M third_party/WebKit/Source/core/paint/HTMLCanvasPainterTest.cpp
M third_party/WebKit/Source/modules/canvas/canvas2d/BaseRenderingContext2D.cpp
M third_party/WebKit/Source/modules/canvas/canvas2d/BaseRenderingContext2D.h
M third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.cpp
M third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.h
M third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2DTest.cpp
M third_party/WebKit/Source/modules/canvas/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
M third_party/WebKit/Source/modules/canvas/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
M third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.h
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
16 files changed, 188 insertions(+), 223 deletions(-)
To view, visit change 967252. To unsubscribe, or for help writing mail filters, visit settings.
Olivia Lai would like Zhenyao Mo to review this change.
Patch set 9:Commit-Queue +2
CQ is trying the patch.
Note: The patchset sent to CQ was uploaded after this CL was approved.
"Edit commit message" https://chromium-review.googlesource.com/c/967252/9
Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/chromium-review.googlesource.com/967252/9
Bot data: {"action": "start", "triggered_at": "2018-03-19T20:41:47.0Z", "cq_cfg_revision": "5b6c43e4d6b0297aa92e118e785d640c42297271", "revision": "beb8760f9f5f9e43563285bd5f75f0548708b012"}
Commit Bot merged this change.
Tidy up canvas code after ImageBuffer is removed
This CL cleans up code in canvas/OffscreenCanvas and their rendering contexts
in a world after ImageBuffer has been removed. It does the following:
- Renamed certain functions/variables to avoid misleading future readers.
- Split CreateImageBuffer into two functions, one for creating
Canvas2dLayerBridge in 2d context, another for creating resourceProvider for
webgl in webgl context. It was unnecessary and misleading to lump these two
unrelated operations together.
- Drive-by deletion of some unused code.
TBR=z...@chromium.org
Bug: 776806
Cq-Include-Trybots: luci.chromium.try:linux_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Id06026649894ddf20677f509296d87c5cfb4a5d6
Reviewed-on: https://chromium-review.googlesource.com/967252
Commit-Queue: Olivia Lai <xl...@chromium.org>
Reviewed-by: Justin Novosad <ju...@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544190}
---
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContextHost.h
M third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.cpp
M third_party/WebKit/Source/core/html/canvas/HTMLCanvasElement.h
M third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
M third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
M third_party/WebKit/Source/core/paint/HTMLCanvasPainterTest.cpp
M third_party/WebKit/Source/modules/canvas/canvas2d/BaseRenderingContext2D.cpp
M third_party/WebKit/Source/modules/canvas/canvas2d/BaseRenderingContext2D.h
M third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.cpp
M third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2D.h
M third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2DTest.cpp
M third_party/WebKit/Source/modules/canvas/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
M third_party/WebKit/Source/modules/canvas/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
M third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2D.h
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
16 files changed, 188 insertions(+), 223 deletions(-)