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

Side by Side Diff: cc/texture_layer_unittest.cc

Issue 12612005: Revert 186627 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/texture_mailbox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/texture_layer.h" 5 #include "cc/texture_layer.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "cc/layer_tree_host.h" 10 #include "cc/layer_tree_host.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 { 286 {
287 } 287 }
288 288
289 // Make sure callback is received on main and doesn't block the impl thread. 289 // Make sure callback is received on main and doesn't block the impl thread.
290 void releaseCallback(unsigned syncPoint) { 290 void releaseCallback(unsigned syncPoint) {
291 EXPECT_EQ(true, proxy()->isMainThread()); 291 EXPECT_EQ(true, proxy()->isMainThread());
292 ++m_callbackCount; 292 ++m_callbackCount;
293 } 293 }
294 294
295 void setMailbox(char mailbox_char) { 295 void setMailbox(char mailbox_char) {
296 gpu::Mailbox name;
297 memset(name.name, mailbox_char, sizeof(name.name));
298 TextureMailbox mailbox( 296 TextureMailbox mailbox(
299 name, 297 std::string(64, mailbox_char),
300 base::Bind( 298 base::Bind(
301 &TextureLayerImplWithMailboxThreadedCallback::releaseCallback, 299 &TextureLayerImplWithMailboxThreadedCallback::releaseCallback,
302 base::Unretained(this))); 300 base::Unretained(this)));
303 m_layer->setTextureMailbox(mailbox); 301 m_layer->setTextureMailbox(mailbox);
304 } 302 }
305 303
306 virtual void beginTest() OVERRIDE 304 virtual void beginTest() OVERRIDE
307 { 305 {
308 gfx::Size bounds(100, 100); 306 gfx::Size bounds(100, 100);
309 m_root = Layer::create(); 307 m_root = Layer::create();
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 EXPECT_CALL(m_testData.m_mockCallback, Release(_, _)).Times(0); 486 EXPECT_CALL(m_testData.m_mockCallback, Release(_, _)).Times(0);
489 provider->DeleteResource(id); 487 provider->DeleteResource(id);
490 Mock::VerifyAndClearExpectations(&m_testData.m_mockCallback); 488 Mock::VerifyAndClearExpectations(&m_testData.m_mockCallback);
491 EXPECT_CALL(m_testData.m_mockCallback, 489 EXPECT_CALL(m_testData.m_mockCallback,
492 Release(m_testData.m_mailboxName1, _)).Times(1); 490 Release(m_testData.m_mailboxName1, _)).Times(1);
493 provider->ReceiveFromParent(list); 491 provider->ReceiveFromParent(list);
494 } 492 }
495 493
496 } // namespace 494 } // namespace
497 } // namespace cc 495 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/texture_mailbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698