summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authormiu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 19:32:30 +0000
committermiu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-07 19:32:30 +0000
commit06666c0c1f1cade8d428cc01dbd9127a230e563b (patch)
treecea3d85b2434675e1cb59f65fbe2f61d9c7289dc /content/renderer
parent9b2f38d6d96a91322438042ba879fa527102eedb (diff)
downloadchromium_src-06666c0c1f1cade8d428cc01dbd9127a230e563b.zip
chromium_src-06666c0c1f1cade8d428cc01dbd9127a230e563b.tar.gz
chromium_src-06666c0c1f1cade8d428cc01dbd9127a230e563b.tar.bz2
Revert 186627
Speculative revert. The tree went red at the time this change was checked in, and multiple GpuFeatureTests started failing consistently. Example failure: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=@DEPS - chromium.org&testType=browser_tests&tests=GpuFeatureTest.WebGLAllowed If you look at the first Win Aura Tests (2) fail, you get the following blamelist range: 186630 to 186619. > Use gpu::Mailbox in IPCs instead of std::string > > gpu::Mailbox is safer since the size is checked in the deserializer. It's also > overall less code. > > BUG=None > > > Review URL: https://chromiumcodereview.appspot.com/12440005 TBR=piman@chromium.org Review URL: https://codereview.chromium.org/12612005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/browser_plugin/browser_plugin.cc2
-rw-r--r--content/renderer/browser_plugin/browser_plugin.h6
-rw-r--r--content/renderer/browser_plugin/browser_plugin_compositing_helper.cc16
-rw-r--r--content/renderer/browser_plugin/browser_plugin_compositing_helper.h10
-rw-r--r--content/renderer/browser_plugin/browser_plugin_manager_impl.cc2
-rw-r--r--content/renderer/browser_plugin/browser_plugin_manager_impl.h6
6 files changed, 16 insertions, 26 deletions
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 0f65cdb..d96b819 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -411,7 +411,7 @@ void BrowserPlugin::OnAdvanceFocus(int instance_id, bool reverse) {
void BrowserPlugin::OnBuffersSwapped(int instance_id,
const gfx::Size& size,
- gpu::Mailbox mailbox_name,
+ std::string mailbox_name,
int gpu_route_id,
int gpu_host_id) {
DCHECK(instance_id == instance_id_);
diff --git a/content/renderer/browser_plugin/browser_plugin.h b/content/renderer/browser_plugin/browser_plugin.h
index b907120..baf97de 100644
--- a/content/renderer/browser_plugin/browser_plugin.h
+++ b/content/renderer/browser_plugin/browser_plugin.h
@@ -26,10 +26,6 @@ struct BrowserPluginHostMsg_ResizeGuest_Params;
struct BrowserPluginMsg_LoadCommit_Params;
struct BrowserPluginMsg_UpdateRect_Params;
-namespace gpu {
-struct Mailbox;
-}
-
namespace content {
class BrowserPluginCompositingHelper;
@@ -310,7 +306,7 @@ class CONTENT_EXPORT BrowserPlugin :
void OnAdvanceFocus(int instance_id, bool reverse);
void OnBuffersSwapped(int instance_id,
const gfx::Size& size,
- gpu::Mailbox mailbox_name,
+ std::string mailbox_name,
int gpu_route_id,
int gpu_host_id);
void OnGuestContentWindowReady(int instance_id,
diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
index f98d489b..c52a68e 100644
--- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
+++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.cc
@@ -63,9 +63,9 @@ void BrowserPluginCompositingHelper::EnableCompositing(bool enable) {
// We use a shared graphics context accessible from the main
// thread to do it.
void BrowserPluginCompositingHelper::FreeMailboxMemory(
- const gpu::Mailbox& mailbox_name,
+ const std::string& mailbox_name,
unsigned sync_point) {
- if (mailbox_name.IsZero())
+ if (mailbox_name.empty())
return;
scoped_refptr<cc::ContextProvider> context_provider =
@@ -87,12 +87,14 @@ void BrowserPluginCompositingHelper::FreeMailboxMemory(
unsigned texture_id = context->createTexture();
context->bindTexture(GL_TEXTURE_2D, texture_id);
- context->consumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox_name.name);
+ context->consumeTextureCHROMIUM(
+ GL_TEXTURE_2D,
+ reinterpret_cast<const int8*>(mailbox_name.data()));
context->deleteTexture(texture_id);
}
void BrowserPluginCompositingHelper::MailboxReleased(
- const gpu::Mailbox& mailbox_name,
+ const std::string& mailbox_name,
int gpu_route_id,
int gpu_host_id,
unsigned sync_point) {
@@ -154,7 +156,7 @@ void BrowserPluginCompositingHelper::OnContainerDestroy() {
void BrowserPluginCompositingHelper::OnBuffersSwapped(
const gfx::Size& size,
- const gpu::Mailbox& mailbox_name,
+ const std::string& mailbox_name,
int gpu_route_id,
int gpu_host_id,
float device_scale_factor) {
@@ -201,9 +203,9 @@ void BrowserPluginCompositingHelper::OnBuffersSwapped(
texture_layer_->setBounds(device_scale_adjusted_size);
}
- bool current_mailbox_valid = !mailbox_name.IsZero();
+ bool current_mailbox_valid = !mailbox_name.empty();
if (!last_mailbox_valid_) {
- MailboxReleased(gpu::Mailbox(), gpu_route_id, gpu_host_id, 0);
+ MailboxReleased(std::string(), gpu_route_id, gpu_host_id, 0);
if (!current_mailbox_valid)
return;
}
diff --git a/content/renderer/browser_plugin/browser_plugin_compositing_helper.h b/content/renderer/browser_plugin/browser_plugin_compositing_helper.h
index 8d9b1b2..998b739 100644
--- a/content/renderer/browser_plugin/browser_plugin_compositing_helper.h
+++ b/content/renderer/browser_plugin/browser_plugin_compositing_helper.h
@@ -17,10 +17,6 @@ class SolidColorLayer;
class TextureLayer;
}
-namespace gpu {
-struct Mailbox;
-}
-
namespace WebKit {
class WebPluginContainer;
class WebLayer;
@@ -40,7 +36,7 @@ class CONTENT_EXPORT BrowserPluginCompositingHelper :
void EnableCompositing(bool);
void OnContainerDestroy();
void OnBuffersSwapped(const gfx::Size& size,
- const gpu::Mailbox& mailbox_name,
+ const std::string& mailbox_name,
int gpu_route_id,
int gpu_host_id,
float device_scale_factor);
@@ -50,9 +46,9 @@ class CONTENT_EXPORT BrowserPluginCompositingHelper :
friend class base::RefCounted<BrowserPluginCompositingHelper>;
private:
~BrowserPluginCompositingHelper();
- void FreeMailboxMemory(const gpu::Mailbox& mailbox_name,
+ void FreeMailboxMemory(const std::string& mailbox_name,
unsigned sync_point);
- void MailboxReleased(const gpu::Mailbox& mailbox_name,
+ void MailboxReleased(const std::string& mailbox_name,
int gpu_route_id,
int gpu_host_id,
unsigned sync_point);
diff --git a/content/renderer/browser_plugin/browser_plugin_manager_impl.cc b/content/renderer/browser_plugin/browser_plugin_manager_impl.cc
index 40f9517..ac9880e 100644
--- a/content/renderer/browser_plugin/browser_plugin_manager_impl.cc
+++ b/content/renderer/browser_plugin/browser_plugin_manager_impl.cc
@@ -100,7 +100,7 @@ void BrowserPluginManagerImpl::OnPluginAtPositionRequest(
void BrowserPluginManagerImpl::OnUnhandledSwap(const IPC::Message& message,
int instance_id,
const gfx::Size& size,
- gpu::Mailbox mailbox_name,
+ std::string mailbox_name,
int gpu_route_id,
int gpu_host_id) {
// After the BrowserPlugin object sends a destroy message to the
diff --git a/content/renderer/browser_plugin/browser_plugin_manager_impl.h b/content/renderer/browser_plugin/browser_plugin_manager_impl.h
index b8505e3..2496474 100644
--- a/content/renderer/browser_plugin/browser_plugin_manager_impl.h
+++ b/content/renderer/browser_plugin/browser_plugin_manager_impl.h
@@ -16,10 +16,6 @@ namespace gfx {
class Point;
}
-namespace gpu {
-struct Mailbox;
-}
-
namespace content {
class BrowserPluginManagerImpl : public BrowserPluginManager {
@@ -50,7 +46,7 @@ class BrowserPluginManagerImpl : public BrowserPluginManager {
void OnUnhandledSwap(const IPC::Message& message,
int instance_id,
const gfx::Size& size,
- gpu::Mailbox mailbox_name,
+ std::string mailbox_name,
int gpu_route_id,
int gpu_host_id);