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

Issue 1181013010: Support impl-side painting in Mandoline. (Closed)

Created:
5 years, 6 months ago by jam
Modified:
5 years, 1 month ago
Reviewers:
danakj, yzshen1, sky, piman
CC:
chromium-reviews, sadrul, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, kalyank, piman+watch_chromium.org, darin (slow to review), ben+mojo_chromium.org, cc-bugs_chromium.org, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support impl-side painting in Mandoline. This is now the default in cc and the old code paths are being removed, so we need to use impl-side painting. The changes are: -add necessary thunks for the gl methods -expose gpu::GpuMemoryBufferManager and cc::TaskGraphRunner in ui and html_viewer -IPC to view_manager and call the GPU code (modelled on content) BUG=499030 NOPRESUBMIT=true Committed: https://crrev.com/b14138431960bb3542e7b1b7447363ef13528e0d Cr-Commit-Position: refs/heads/master@{#334602}

Patch Set 1 #

Patch Set 2 : remove GetSharedBitmapManager since that's only for software compositing per Dana #

Patch Set 3 : merge #

Patch Set 4 : plumb CreateImage #

Patch Set 5 : more gl methods #

Patch Set 6 : add missing files and fix UI display by adding extra thunks #

Patch Set 7 : make html viewer use impl side #

Patch Set 8 : html viewer renders but crashes soon after #

Patch Set 9 : fix discardable memory now that it can be used by multiple threads #

Patch Set 10 : implement DestroyImage and CreateGpuMemoryBufferImage #

Patch Set 11 : update build.gn file #

Patch Set 12 : test link fix #

Patch Set 13 : more error checking and fix clang warnings #

Patch Set 14 : fix unittest and android gn build #

Total comments: 48

Patch Set 15 : review comments #

Patch Set 16 : autogenerated files & comment #

Patch Set 17 : sky comments #

Patch Set 18 : fix uninitialized variable #

Patch Set 19 : fix presubmit warning #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1079 lines, -384 lines) Patch
M components/html_viewer/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/html_viewer/discardable_memory_allocator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +21 lines, -13 lines 0 comments Download
M components/html_viewer/discardable_memory_allocator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +49 lines, -72 lines 0 comments Download
M components/html_viewer/discardable_memory_allocator_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +9 lines, -16 lines 0 comments Download
M components/html_viewer/html_document.cc View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M components/html_viewer/setup.h View 1 2 3 4 5 6 3 chunks +12 lines, -0 lines 0 comments Download
M components/html_viewer/web_layer_tree_view_impl.h View 1 2 3 4 5 6 2 chunks +7 lines, -0 lines 0 comments Download
M components/html_viewer/web_layer_tree_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +8 lines, -2 lines 0 comments Download
M components/view_manager/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M components/view_manager/gles2/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +7 lines, -0 lines 0 comments Download
M components/view_manager/gles2/DEPS View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M components/view_manager/gles2/command_buffer_driver.h View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M components/view_manager/gles2/command_buffer_driver.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +86 lines, -3 lines 1 comment Download
M components/view_manager/gles2/command_buffer_impl.h View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M components/view_manager/gles2/command_buffer_impl.cc View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
A components/view_manager/gles2/mojo_gpu_memory_buffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +48 lines, -0 lines 0 comments Download
A + components/view_manager/gles2/mojo_gpu_memory_buffer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +161 lines, -167 lines 0 comments Download
A + components/view_manager/gles2/mojo_gpu_memory_buffer_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +25 lines, -25 lines 0 comments Download
A components/view_manager/gles2/mojo_gpu_memory_buffer_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +37 lines, -0 lines 0 comments Download
A components/view_manager/gles2/raster_thread_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +34 lines, -0 lines 0 comments Download
A components/view_manager/gles2/raster_thread_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +39 lines, -0 lines 0 comments Download
M components/view_manager/public/interfaces/command_buffer.mojom View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download
M components/view_manager/surfaces/surfaces_context_provider.cc View 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 10 chunks +24 lines, -10 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h View 15 chunks +32 lines, -32 lines 0 comments Download
M mandoline/ui/aura/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M mandoline/ui/aura/surface_context_factory.h View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M mandoline/ui/aura/surface_context_factory.cc View 1 2 3 4 5 6 2 chunks +2 lines, -5 lines 0 comments Download
M mojo/cc/context_provider_mojo.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/gles2/command_buffer_client_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/gles2/command_buffer_client_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +63 lines, -9 lines 0 comments Download
M mojo/gles2/gles2_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/gpu/mojo_gles2_impl_autogen.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +23 lines, -13 lines 0 comments Download
M mojo/runner/native_application_support.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +9 lines, -0 lines 0 comments Download
M third_party/mojo/src/mojo/public/c/gles2/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
A + third_party/mojo/src/mojo/public/c/gles2/chromium_copy_texture.h View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
A + third_party/mojo/src/mojo/public/c/gles2/chromium_image.h View 2 chunks +6 lines, -4 lines 0 comments Download
A + third_party/mojo/src/mojo/public/c/gles2/chromium_pixel_transfer_buffer_object.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -4 lines 0 comments Download
A third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_chromium_copy_texture_autogen.h View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_chromium_image_autogen.h View 1 2 3 4 8 9 10 11 12 13 14 1 chunk +29 lines, -0 lines 0 comments Download
A + third_party/mojo/src/mojo/public/c/gles2/gles2_call_visitor_chromium_pixel_transfer_buffer_object_autogen.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -2 lines 0 comments Download
M third_party/mojo/src/mojo/public/platform/native/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
A third_party/mojo/src/mojo/public/platform/native/gles2_impl_chromium_copy_texture_thunks.h View 1 2 3 4 1 chunk +44 lines, -0 lines 0 comments Download
A third_party/mojo/src/mojo/public/platform/native/gles2_impl_chromium_copy_texture_thunks.cc View 1 2 3 4 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/mojo/src/mojo/public/platform/native/gles2_impl_chromium_image_thunks.h View 1 chunk +44 lines, -0 lines 0 comments Download
A third_party/mojo/src/mojo/public/platform/native/gles2_impl_chromium_image_thunks.cc View 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/mojo/src/mojo/public/platform/native/gles2_impl_chromium_pixel_transfer_buffer_object_thunks.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +44 lines, -0 lines 0 comments Download
A third_party/mojo/src/mojo/public/platform/native/gles2_impl_chromium_pixel_transfer_buffer_object_thunks.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +31 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (11 generated)
jam
sky: Please review components/html_viewer and mandoline piman: the rest https://codereview.chromium.org/1181013010/diff/270001/components/view_manager/gles2/mojo_gpu_memory_buffer.h File components/view_manager/gles2/mojo_gpu_memory_buffer.h (right): https://codereview.chromium.org/1181013010/diff/270001/components/view_manager/gles2/mojo_gpu_memory_buffer.h#newcode19 components/view_manager/gles2/mojo_gpu_memory_buffer.h:19: ...
5 years, 6 months ago (2015-06-15 17:23:40 UTC) #3
jam
also i'll send the mojo side change upstream in https://codereview.chromium.org/1185963002/
5 years, 6 months ago (2015-06-15 17:24:02 UTC) #4
danakj
https://codereview.chromium.org/1181013010/diff/270001/components/html_viewer/discardable_memory_allocator.cc File components/html_viewer/discardable_memory_allocator.cc (right): https://codereview.chromium.org/1181013010/diff/270001/components/html_viewer/discardable_memory_allocator.cc#newcode25 components/html_viewer/discardable_memory_allocator.cc:25: DCHECK(data_.get() || !is_locked_); nit: you could DCHECK_IMPLIES(!data_, !is_locked_) might ...
5 years, 6 months ago (2015-06-15 17:47:34 UTC) #6
piman
LGTM+nits https://codereview.chromium.org/1181013010/diff/270001/gpu/command_buffer/build_gles2_cmd_buffer.py File gpu/command_buffer/build_gles2_cmd_buffer.py (right): https://codereview.chromium.org/1181013010/diff/270001/gpu/command_buffer/build_gles2_cmd_buffer.py#newcode3058 gpu/command_buffer/build_gles2_cmd_buffer.py:3058: 'extension': "CHROMIUM_image", nit: CHROMIUM_pixel_transfer_buffer_object I realize this extension ...
5 years, 6 months ago (2015-06-15 18:14:34 UTC) #7
danakj
https://codereview.chromium.org/1181013010/diff/270001/components/view_manager/gles2/command_buffer_driver.cc File components/view_manager/gles2/command_buffer_driver.cc (right): https://codereview.chromium.org/1181013010/diff/270001/components/view_manager/gles2/command_buffer_driver.cc#newcode263 components/view_manager/gles2/command_buffer_driver.cc:263: if (type != gfx::SHARED_MEMORY_BUFFER) { Could all/some of these ...
5 years, 6 months ago (2015-06-15 18:20:36 UTC) #8
yzshen1
https://codereview.chromium.org/1181013010/diff/270001/mojo/gles2/command_buffer_client_impl.cc File mojo/gles2/command_buffer_client_impl.cc (right): https://codereview.chromium.org/1181013010/diff/270001/mojo/gles2/command_buffer_client_impl.cc#newcode254 mojo/gles2/command_buffer_client_impl.cc:254: size->width = width; FYI, I tried to compile the ...
5 years, 6 months ago (2015-06-15 20:04:42 UTC) #10
sky
LGTM https://codereview.chromium.org/1181013010/diff/270001/components/html_viewer/discardable_memory_allocator.cc File components/html_viewer/discardable_memory_allocator.cc (right): https://codereview.chromium.org/1181013010/diff/270001/components/html_viewer/discardable_memory_allocator.cc#newcode105 components/html_viewer/discardable_memory_allocator.cc:105: return make_scoped_ptr(chunk); nit: move scoped_ptr to 89 and ...
5 years, 6 months ago (2015-06-15 21:47:47 UTC) #11
jam
btw I've been seeing [0615/145740:ERROR:gles2_cmd_decoder.cc(12110)] [GroupMarkerNotSet(crbug.com/242999)!:F890860D]GL ERROR :GL_INVALID_VALUE : glCopySubTextureCHROMIUM: source texture has no level ...
5 years, 6 months ago (2015-06-15 22:06:02 UTC) #12
danakj
LGTM https://codereview.chromium.org/1181013010/diff/270001/mojo/cc/context_provider_mojo.cc File mojo/cc/context_provider_mojo.cc (right): https://codereview.chromium.org/1181013010/diff/270001/mojo/cc/context_provider_mojo.cc#newcode16 mojo/cc/context_provider_mojo.cc:16: capabilities_.gpu.image = true; On 2015/06/15 22:06:01, jam wrote: ...
5 years, 6 months ago (2015-06-15 22:11:20 UTC) #13
danakj
On 2015/06/15 22:06:02, jam wrote: > btw I've been seeing > > [0615/145740:ERROR:gles2_cmd_decoder.cc(12110)] > [GroupMarkerNotSet(crbug.com/242999)!:F890860D]GL ...
5 years, 6 months ago (2015-06-15 22:12:59 UTC) #14
piman
On Mon, Jun 15, 2015 at 3:06 PM, <jam@chromium.org> wrote: > btw I've been seeing ...
5 years, 6 months ago (2015-06-15 22:13:53 UTC) #15
jam
On 2015/06/15 22:13:53, piman (Very slow to review) wrote: > On Mon, Jun 15, 2015 ...
5 years, 6 months ago (2015-06-15 22:27:57 UTC) #16
jam
https://codereview.chromium.org/1181013010/diff/270001/components/html_viewer/discardable_memory_allocator.cc File components/html_viewer/discardable_memory_allocator.cc (right): https://codereview.chromium.org/1181013010/diff/270001/components/html_viewer/discardable_memory_allocator.cc#newcode105 components/html_viewer/discardable_memory_allocator.cc:105: return make_scoped_ptr(chunk); On 2015/06/15 21:47:46, sky wrote: > nit: ...
5 years, 6 months ago (2015-06-15 22:44:55 UTC) #17
jam
On 2015/06/15 22:27:57, jam wrote: > On 2015/06/15 22:13:53, piman (Very slow to review) wrote: ...
5 years, 6 months ago (2015-06-16 01:28:02 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1181013010/350001
5 years, 6 months ago (2015-06-16 02:50:29 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/71129)
5 years, 6 months ago (2015-06-16 02:58:34 UTC) #23
jam
Adding NOPRESUBMIT=true since the python file adds an include to a generated header that is ...
5 years, 6 months ago (2015-06-16 03:03:04 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1181013010/370001
5 years, 6 months ago (2015-06-16 03:03:51 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1181013010/370001
5 years, 6 months ago (2015-06-16 14:22:16 UTC) #30
commit-bot: I haz the power
Committed patchset #19 (id:370001)
5 years, 6 months ago (2015-06-16 14:55:29 UTC) #31
commit-bot: I haz the power
Patchset 19 (id:??) landed as https://crrev.com/b14138431960bb3542e7b1b7447363ef13528e0d Cr-Commit-Position: refs/heads/master@{#334602}
5 years, 6 months ago (2015-06-16 14:56:28 UTC) #32
yzshen1
https://codereview.chromium.org/1181013010/diff/270001/mojo/gles2/command_buffer_client_impl.cc File mojo/gles2/command_buffer_client_impl.cc (right): https://codereview.chromium.org/1181013010/diff/270001/mojo/gles2/command_buffer_client_impl.cc#newcode254 mojo/gles2/command_buffer_client_impl.cc:254: size->width = width; On 2015/06/15 22:06:02, jam wrote: > ...
5 years, 6 months ago (2015-06-16 16:34:25 UTC) #33
Marijn Kruisselbrink
A revert of this CL (patchset #19 id:370001) has been created in https://codereview.chromium.org/1189833005/ by mek@chromium.org. ...
5 years, 6 months ago (2015-06-16 17:51:47 UTC) #34
jam
On 2015/06/16 17:51:47, Marijn Kruisselbrink wrote: > A revert of this CL (patchset #19 id:370001) ...
5 years, 6 months ago (2015-06-16 17:58:34 UTC) #35
tfarina
5 years, 1 month ago (2015-10-26 12:12:09 UTC) #36
Message was sent while issue was closed.
https://codereview.chromium.org/1181013010/diff/370001/components/view_manage...
File components/view_manager/gles2/command_buffer_driver.cc (right):

https://codereview.chromium.org/1181013010/diff/370001/components/view_manage...
components/view_manager/gles2/command_buffer_driver.cc:285: gfx_handle.handle =
base::FileDescriptor(platform_handle, false);
Unfortunately this does not work on Mac:

../../components/mus/gles2/command_buffer_driver.cc:249:10: error: no viable
overloaded '='
  handle = base::FileDescriptor(platform_handle, false);
  ~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../base/memory/shared_memory_handle.h:117:23: note: candidate function not
viable: no known conversion from 'base::FileDescriptor' to 'const
base::SharedMemoryHandle' for 1st argument
  SharedMemoryHandle& operator=(const SharedMemoryHandle& handle);
                      ^
1 error generated.

base::SharedMemoryHandle (base/memory/shared_memory_handle.h) is declared as
follow:

#if defined(OS_POSIX) && !(defined(OS_MACOSX) && !defined(OS_IOS))
typedef FileDescriptor SharedMemoryHandle;
#elif defined(OS_WIN)
class BASE_EXPORT SharedMemoryHandle {
...
};
#else
class BASE_EXPORT SharedMemoryHandle {
};
#endif

Powered by Google App Engine
This is Rietveld 408576698