Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Issue 2521013003: Compositing Layer update for OffscreenCanvas resize (Closed)

Created:
4 years ago by xlai (Olivia)
Modified:
3 years, 11 months ago
Reviewers:
Fady Samuel, xidachen
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, blink-reviews-platform-graphics_chromium.org, dshwang, yzshen+watch_chromium.org, Stephen Chennney, rwlbuis, krit, drott+blinkwatch_chromium.org, jam, Justin Novosad, abarth-chromium, dglazkov+blink, Rik, darin-cc_chromium.org, blink-reviews, ajuma+watch_chromium.org, blink-reviews-api_chromium.org, jbroman, pdr+graphicswatchlist_chromium.org, danakj+watch_chromium.org, Aaron Boodman, f(malita), darin (slow to review)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Compositing Layer update for OffscreenCanvas resize After OffscreenCanvas resizes, OffscreenCanvasFrameDispatcher will pick up the new size in the next commit() and prepares a compositor frame that is of the new size. OffscreeCanvasCompositorFrameSink, the browser service-end of FrameDispatcher, will re-create a new Surface upon detection of a different size. Then it propagates the resizing information to OffscreenCanvasSurfaceImpl, which then sends an IPC back to CanvasSurfaceLayerBridge to re-create a new SurfaceLayer for HTMLCanvasElement on renderer/main. This CL just creates the most basic functioning of OffscreenCanvas resize. It does not consider the case when resizing happens after the last commit(). More refactoring on OffscreenCanvasSurfaceImpl will be done to remove the sync IPC in the future. BUG=662498 CQ_INCLUDE_TRYBOTS=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;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Patch Set 1 #

Patch Set 2 : test #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -37 lines) Patch
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc View 3 chunks +37 lines, -1 line 1 comment Download
M content/browser/renderer_host/offscreen_canvas_surface_impl.h View 1 chunk +10 lines, -1 line 0 comments Download
M content/browser/renderer_host/offscreen_canvas_surface_impl.cc View 3 chunks +12 lines, -2 lines 0 comments Download
A content/test/data/gpu/pixel_offscreenCanvas_resize.html View 1 1 chunk +74 lines, -0 lines 0 comments Download
M content/test/gpu/gpu_tests/pixel_expectations.py View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/test/gpu/gpu_tests/pixel_test_pages.py View 1 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp View 2 chunks +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h View 3 chunks +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp View 2 chunks +33 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp View 2 chunks +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcher.h View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h View 2 chunks +7 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp View 3 chunks +17 lines, -10 lines 0 comments Download
M third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom View 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 4 (2 generated)
xlai (Olivia)
fsamuel@: In this CL, I do the following: 1. add a return IPC from OffscreenCanvasSurfaceImpl ...
4 years ago (2016-11-22 15:56:12 UTC) #3
Fady Samuel
4 years ago (2016-11-22 16:04:10 UTC) #4
https://cs.chromium.org/chromium/src/services/ui/ws/gpu_compositor_frame_sink...

https://codereview.chromium.org/2521013003/diff/20001/content/browser/rendere...
File content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc
(right):

https://codereview.chromium.org/2521013003/diff/20001/content/browser/rendere...
content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc:53: if
(!GetSurfaceManager()->GetSurfaceForId(surface_id_)) {
I hate to be overly nitpicky but this flow doesn't match other
CompositorFrameSinks. In the interest of producing a unified API, please try to
get to that state.

SurfaceIdAllocator should be owned by CompositorFrameSink.

See GpuCompositorFrameSink::SubmitCompositorFrame. Please try to match that
code.

OffscreenCanvasCompositorFrameSink should not know about
OffscreenCanvasSurfaceImpl.

Powered by Google App Engine
This is Rietveld 408576698