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

Issue 6241015: Make Pepper resize the buffer through the command buffer. (Closed)

Created:
9 years, 11 months ago by piman
Modified:
9 years, 7 months ago
CC:
chromium-reviews, darin-cc_chromium.org, apatrick_chromium, brettw-cc_chromium.org, jonathan.backer
Visibility:
Public.

Description

Make Pepper resize the buffer through the command buffer. This adds support for glResizeCHROMIUM for off-screen contexts. BUG=none TEST=Pepper flash. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=72575

Patch Set 1 #

Total comments: 6

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -37 lines) Patch
M chrome/gpu/gpu_command_buffer_stub.cc View 1 2 chunks +18 lines, -19 lines 0 comments Download
M chrome/renderer/pepper_platform_context_3d_impl.h View 3 chunks +3 lines, -1 line 0 comments Download
M chrome/renderer/pepper_platform_context_3d_impl.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M webkit/plugins/ppapi/plugin_delegate.h View 1 chunk +0 lines, -3 lines 0 comments Download
M webkit/plugins/ppapi/ppb_surface_3d_impl.cc View 2 chunks +4 lines, -9 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
piman
9 years, 11 months ago (2011-01-25 03:52:08 UTC) #1
apatrick
LGTM. Thanks. http://codereview.chromium.org/6241015/diff/1/webkit/plugins/ppapi/ppb_surface_3d_impl.cc File webkit/plugins/ppapi/ppb_surface_3d_impl.cc (right): http://codereview.chromium.org/6241015/diff/1/webkit/plugins/ppapi/ppb_surface_3d_impl.cc#newcode110 webkit/plugins/ppapi/ppb_surface_3d_impl.cc:110: context->GetGLES2Implementation()->ResizeCHROMIUM( The issue with calling this concurrently ...
9 years, 11 months ago (2011-01-25 18:22:48 UTC) #2
neb
http://codereview.chromium.org/6241015/diff/1/chrome/gpu/gpu_command_buffer_stub.cc File chrome/gpu/gpu_command_buffer_stub.cc (right): http://codereview.chromium.org/6241015/diff/1/chrome/gpu/gpu_command_buffer_stub.cc#newcode265 chrome/gpu/gpu_command_buffer_stub.cc:265: NewCallback(this, This can fit on the same line, no? ...
9 years, 11 months ago (2011-01-25 19:16:06 UTC) #3
Antoine Labour
9 years, 11 months ago (2011-01-25 19:32:24 UTC) #4
http://codereview.chromium.org/6241015/diff/1/chrome/gpu/gpu_command_buffer_s...
File chrome/gpu/gpu_command_buffer_stub.cc (right):

http://codereview.chromium.org/6241015/diff/1/chrome/gpu/gpu_command_buffer_s...
chrome/gpu/gpu_command_buffer_stub.cc:265: NewCallback(this,
On 2011/01/25 19:16:06, neb wrote:
> This can fit on the same line, no?

Done.

http://codereview.chromium.org/6241015/diff/1/webkit/plugins/ppapi/ppb_surfac...
File webkit/plugins/ppapi/ppb_surface_3d_impl.cc (right):

http://codereview.chromium.org/6241015/diff/1/webkit/plugins/ppapi/ppb_surfac...
webkit/plugins/ppapi/ppb_surface_3d_impl.cc:109: const gfx::Size& size =
instance()->position().size();
On 2011/01/25 19:16:06, neb wrote:
> I'm wondering if we can split this right now into a part that sets up
callbacks
> and the part that touches the command buffer because we'll use a different
> command buffer in nacl proxy.

Right, I have a follow up CL where the command buffer implementation is created
explicitly in the ppb_context_3d_impl instead of implicitly by the delegate. In
the case of a proxy'ed plugin, it would not do that, and we would skip the
ResizeChromium (here) and the SwapBuffers (below), giving responsibility of that
to the plugin side (same with NaCl).
Since it's in a follow-up CL, I don't want to do too much refactoring just yet,
keeping this one simple.

http://codereview.chromium.org/6241015/diff/1/webkit/plugins/ppapi/ppb_surfac...
webkit/plugins/ppapi/ppb_surface_3d_impl.cc:110:
context->GetGLES2Implementation()->ResizeCHROMIUM(
On 2011/01/25 18:22:48, apatrick wrote:
> The issue with calling this concurrently with GL calls on another thread
remain.
> Not necessarily a problem, maybe just something to be documented.

In truth, none of the pepper calls are thread-safe, aside of CallOnMainThread,
and this is no different.
I could add a note here, but it's the same with SwapBuffers below, and virtually
all the pepper calls. The GL calls themselves aren't thread safe (the context
lookup), so in practice you can't call GL from another thread currently.

Powered by Google App Engine
This is Rietveld 408576698