diff options
author | miu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-07 19:32:30 +0000 |
---|---|---|
committer | miu@chromium.org <miu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-07 19:32:30 +0000 |
commit | 06666c0c1f1cade8d428cc01dbd9127a230e563b (patch) | |
tree | cea3d85b2434675e1cb59f65fbe2f61d9c7289dc /cc | |
parent | 9b2f38d6d96a91322438042ba879fa527102eedb (diff) | |
download | chromium_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 'cc')
-rw-r--r-- | cc/texture_layer_unittest.cc | 4 | ||||
-rw-r--r-- | cc/texture_mailbox.cc | 12 | ||||
-rw-r--r-- | cc/texture_mailbox.h | 2 |
3 files changed, 15 insertions, 3 deletions
diff --git a/cc/texture_layer_unittest.cc b/cc/texture_layer_unittest.cc index b89f945..3a419c7c 100644 --- a/cc/texture_layer_unittest.cc +++ b/cc/texture_layer_unittest.cc @@ -293,10 +293,8 @@ public: } void setMailbox(char mailbox_char) { - gpu::Mailbox name; - memset(name.name, mailbox_char, sizeof(name.name)); TextureMailbox mailbox( - name, + std::string(64, mailbox_char), base::Bind( &TextureLayerImplWithMailboxThreadedCallback::releaseCallback, base::Unretained(this))); diff --git a/cc/texture_mailbox.cc b/cc/texture_mailbox.cc index 437fb1c..b534605 100644 --- a/cc/texture_mailbox.cc +++ b/cc/texture_mailbox.cc @@ -12,6 +12,18 @@ TextureMailbox::TextureMailbox() } TextureMailbox::TextureMailbox( + const std::string& mailbox_name, + const ReleaseCallback& mailbox_callback) + : callback_(mailbox_callback), + sync_point_(0) { + DCHECK(mailbox_name.empty() == mailbox_callback.is_null()); + if (!mailbox_name.empty()) { + CHECK(mailbox_name.size() == sizeof(name_.name)); + name_.SetName(reinterpret_cast<const int8*>(mailbox_name.data())); + } +} + +TextureMailbox::TextureMailbox( const gpu::Mailbox& mailbox_name, const ReleaseCallback& mailbox_callback) : callback_(mailbox_callback), diff --git a/cc/texture_mailbox.h b/cc/texture_mailbox.h index 7520087..9314ddd 100644 --- a/cc/texture_mailbox.h +++ b/cc/texture_mailbox.h @@ -18,6 +18,8 @@ class CC_EXPORT TextureMailbox { public: typedef base::Callback<void(unsigned)> ReleaseCallback; TextureMailbox(); + TextureMailbox(const std::string& mailbox_name, + const ReleaseCallback& callback); TextureMailbox(const gpu::Mailbox& mailbox_name, const ReleaseCallback& callback); TextureMailbox(const gpu::Mailbox& mailbox_name, |