New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 794194 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 776801

Blocking:
issue 776806
issue 806066



Sign in to add a comment

Integrate ImageBufferSurface's subclasses into CanvasResourceProvider

Project Member Reported by xlai@chromium.org, Dec 12 2017

Issue description

Currently, there are still a few subclasses of ImageBufferSurface besides Canvas2DLayerBridge:

UnacceleratedImageBufferSurface: used by OffscreenCanvas 2d
AcceleratedImageBufferSurface: used by WebGL rendering context shared by HTMLCanvasElement and OffscreenCanvas

We need to remove these two by transforming them to become a subclass of CanvasResourceProvider such that
UnacceleratedImageBufferSurface should be using kSoftwareResourceUsage 
AcceleratedImageBufferSurface should be using kAcceleratedResourceUsage
 

Comment 1 by xlai@chromium.org, Dec 12 2017

Blockedon: 776801
Blocking: 776806
Project Member

Comment 2 by bugdroid1@chromium.org, Jan 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/95fadc78e3995e16f8f5d11707b05bf27abcff57

commit 95fadc78e3995e16f8f5d11707b05bf27abcff57
Author: xlai <xlai@chromium.org>
Date: Tue Jan 09 21:17:37 2018

Replace ImageBuffer with CanvasResourceProvider in OffscreenCanvas

This CL removes use of ImageBuffer in OffscreenCanvas by replacing
UnacceleratedImageBufferSurface and AcceleratedImageBufferSurface with
CanvasResourceProvider with different usage setting; certain functions (e.g.,
Clear(), Canvas()->save(), WritePixels()) are shifted to CanvasResourceProvider
from ImageBufferSurface.

This CL removes UnacceleratedImageBufferSurface completely.


Bug:  776806 , 794194 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Iadaa1060a74511c61339b7fbfc9b5c6acbfcc4a7
Reviewed-on: https://chromium-review.googlesource.com/855040
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Olivia Lai <xlai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528114}
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/core/html/canvas/CanvasFontCacheTest.cpp
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2DAPITest.cpp
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/modules/canvas/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/modules/canvas/offscreencanvas2d/OffscreenCanvasRenderingContext2D.h
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/platform/graphics/CanvasResourceProvider.cpp
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/platform/graphics/CanvasResourceProvider.h
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
[delete] https://crrev.com/05fc942cc97bad9f1f3a01cb139be1243ef6cd8b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
[delete] https://crrev.com/05fc942cc97bad9f1f3a01cb139be1243ef6cd8b/third_party/WebKit/Source/platform/graphics/UnacceleratedImageBufferSurface.h
[modify] https://crrev.com/95fadc78e3995e16f8f5d11707b05bf27abcff57/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp

Project Member

Comment 3 by bugdroid1@chromium.org, Jan 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d02bb8346f13117d4a81d1124a3aeeaaed83ae99

commit d02bb8346f13117d4a81d1124a3aeeaaed83ae99
Author: xlai <xlai@chromium.org>
Date: Mon Jan 15 20:58:51 2018

Replace webgl_buffer_ in canvas and Remove ImageBuffer(Surface) etc

This CL removes HTMLCanvasElement's webgl_buffer_ and replaces it with
resource_provider_. We still let Canvas2DLayerBridge own the resource provider
pointer when canvas is having 2d rendering context, as Canvas2DLayerBridge
needs to interact with the resource provider pointer intensively.

As AcceleratedImageBufferSurface is replaced with ResourceProvider in all
places, we then remove it together with ImageBufferSurface and ImageBuffer
classes. The ImageBuffer.h is renamed to ImageDataBuffer.h as there is still
another class in that file.

TBR=aboxhall@chromium.org,zmo@chromium.org

Bug:  776806 , 794194 
Cq-Include-Trybots: 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.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I2ac9d0d17265f6e482c5a0a787ef0e9b77c004ab
Reviewed-on: https://chromium-review.googlesource.com/864630
Commit-Queue: Olivia Lai <xlai@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529328}
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/core/exported/WebViewImpl.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/core/html/HTMLCanvasElement.h
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/core/html/canvas/CanvasAsyncBlobCreator.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/core/imagebitmap/ImageBitmap.h
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/core/inspector/InspectorAuditsAgent.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/core/paint/HTMLCanvasPainterTest.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/core/paint/ThemePainterMac.mm
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/core/svg/graphics/SVGImage.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/modules/canvas/canvas2d/CanvasRenderingContext2DTest.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/modules/canvas/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/modules/csspaint/PaintRenderingContext2DTest.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/modules/csspaint/PaintWorkletGlobalScope.h
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.h
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/CanvasResourceProvider.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/CanvasResourceProvider.h
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/GraphicsContext.cpp
[delete] https://crrev.com/ddbc1a049317170cd1e2477e0dd002ba5b6f00cb/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.cpp
[delete] https://crrev.com/ddbc1a049317170cd1e2477e0dd002ba5b6f00cb/third_party/WebKit/Source/platform/graphics/ImageBufferSurface.h
[rename] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/ImageDataBuffer.cpp
[rename] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/ImageDataBuffer.h
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/LoggingCanvas.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/PictureSnapshot.cpp
[delete] https://crrev.com/ddbc1a049317170cd1e2477e0dd002ba5b6f00cb/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp
[delete] https://crrev.com/ddbc1a049317170cd1e2477e0dd002ba5b6f00cb/third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.h
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp
[modify] https://crrev.com/d02bb8346f13117d4a81d1124a3aeeaaed83ae99/third_party/WebKit/Source/platform/graphics/gpu/SharedGpuContextTest.cpp

Comment 4 by xlai@chromium.org, Jan 16 2018

Status: Fixed (was: Assigned)

Comment 5 by kbr@chromium.org, Jan 25 2018

Blocking: 806066

Sign in to add a comment