diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 21:16:02 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-09 21:16:02 +0000 |
commit | d37231fa18e0978822c6aa2c9d03e7a56e61810b (patch) | |
tree | 2765f8b09fe2f23a667cc1c0fb821d384a35dbd0 /chrome/plugin | |
parent | 7b70a92006d329a3e2df40ec6b61322212f75d95 (diff) | |
download | chromium_src-d37231fa18e0978822c6aa2c9d03e7a56e61810b.zip chromium_src-d37231fa18e0978822c6aa2c9d03e7a56e61810b.tar.gz chromium_src-d37231fa18e0978822c6aa2c9d03e7a56e61810b.tar.bz2 |
- Extracted platform specific code from GLES2 command decoder to platform specific GLContext classes.
- GLContext encapsulates management of GL contexts on each platform.
- ReadPixels uses actual current window size to validate source rectangle.
TEST=trybots, running Pepper 3D and WebGL demos on all platforms
BUG=none
Review URL: http://codereview.chromium.org/1605014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44129 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin')
-rw-r--r-- | chrome/plugin/command_buffer_stub.cc | 17 | ||||
-rw-r--r-- | chrome/plugin/command_buffer_stub.h | 2 |
2 files changed, 9 insertions, 10 deletions
diff --git a/chrome/plugin/command_buffer_stub.cc b/chrome/plugin/command_buffer_stub.cc index de18db6..c74de77 100644 --- a/chrome/plugin/command_buffer_stub.cc +++ b/chrome/plugin/command_buffer_stub.cc @@ -93,7 +93,7 @@ void CommandBufferStub::OnInitialize(int32 size, // Initialize the GPUProcessor. processor_.reset(new gpu::GPUProcessor(command_buffer_.get())); - if (!processor_->Initialize(window_, NULL, gfx::Size(), 0)) { + if (!processor_->Initialize(window_, gfx::Size(), NULL, 0)) { Destroy(); return; } @@ -191,30 +191,29 @@ void CommandBufferStub::DestroyPlatformSpecific() { #endif // defined(OS_WIN) #if defined(OS_MACOSX) -void CommandBufferStub::OnSetWindowSize(int32 width, int32 height) { +void CommandBufferStub::OnSetWindowSize(const gfx::Size& size) { // Try using the IOSurface version first. bool notify_repaint = false; - uint64 new_backing_store = processor_->SetWindowSizeForIOSurface(width, - height); + uint64 new_backing_store = processor_->SetWindowSizeForIOSurface(size); if (new_backing_store) { Send(new PluginHostMsg_AcceleratedSurfaceSetIOSurface( plugin_host_route_id_, window_, - width, - height, + size.width(), + size.height(), new_backing_store)); notify_repaint = true; } else { // If |new_backing_store| is 0, it might mean that the IOSurface APIs are // not available. In this case, see if TransportDIBs are supported. TransportDIB::Handle transport_dib = - processor_->SetWindowSizeForTransportDIB(width, height); + processor_->SetWindowSizeForTransportDIB(size); if (TransportDIB::is_valid(transport_dib)) { Send(new PluginHostMsg_AcceleratedSurfaceSetTransportDIB( plugin_host_route_id_, window_, - width, - height, + size.width(), + size.height(), transport_dib)); notify_repaint = true; } diff --git a/chrome/plugin/command_buffer_stub.h b/chrome/plugin/command_buffer_stub.h index 83564ca..0d6f77d 100644 --- a/chrome/plugin/command_buffer_stub.h +++ b/chrome/plugin/command_buffer_stub.h @@ -62,7 +62,7 @@ class CommandBufferStub : public IPC::Channel::Listener, void DestroyPlatformSpecific(); #if defined(OS_MACOSX) - void OnSetWindowSize(int32 width, int32 height); + void OnSetWindowSize(const gfx::Size& size); void SwapBuffersCallback(); void AllocTransportDIB(const size_t size, TransportDIB::Handle* dib_handle); void FreeTransportDIB(TransportDIB::Id dib_id); |