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

Side by Side Diff: cc/texture_layer_unittest.cc

Issue 12378053: Move Mailbox from cc to gpu, and its traits to gpu/ipc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ios hate 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 | « cc/resource_provider_unittest.cc ('k') | 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 , m_mailboxName2(64, '2') 200 , m_mailboxName2(64, '2')
201 , m_syncPoint1(1) 201 , m_syncPoint1(1)
202 , m_syncPoint2(2) 202 , m_syncPoint2(2)
203 { 203 {
204 m_releaseMailbox1 = base::Bind(&MockMailboxCallback::Release, 204 m_releaseMailbox1 = base::Bind(&MockMailboxCallback::Release,
205 base::Unretained(&m_mockCallback), 205 base::Unretained(&m_mockCallback),
206 m_mailboxName1); 206 m_mailboxName1);
207 m_releaseMailbox2 = base::Bind(&MockMailboxCallback::Release, 207 m_releaseMailbox2 = base::Bind(&MockMailboxCallback::Release,
208 base::Unretained(&m_mockCallback), 208 base::Unretained(&m_mockCallback),
209 m_mailboxName2); 209 m_mailboxName2);
210 Mailbox m1; 210 gpu::Mailbox m1;
211 m1.setName(reinterpret_cast<const int8*>(m_mailboxName1.data())); 211 m1.SetName(reinterpret_cast<const int8*>(m_mailboxName1.data()));
212 m_mailbox1 = TextureMailbox(m1, m_releaseMailbox1, m_syncPoint1); 212 m_mailbox1 = TextureMailbox(m1, m_releaseMailbox1, m_syncPoint1);
213 Mailbox m2; 213 gpu::Mailbox m2;
214 m2.setName(reinterpret_cast<const int8*>(m_mailboxName2.data())); 214 m2.SetName(reinterpret_cast<const int8*>(m_mailboxName2.data()));
215 m_mailbox2 = TextureMailbox(m2, m_releaseMailbox2, m_syncPoint2); 215 m_mailbox2 = TextureMailbox(m2, m_releaseMailbox2, m_syncPoint2);
216 } 216 }
217 217
218 std::string m_mailboxName1; 218 std::string m_mailboxName1;
219 std::string m_mailboxName2; 219 std::string m_mailboxName2;
220 MockMailboxCallback m_mockCallback; 220 MockMailboxCallback m_mockCallback;
221 TextureMailbox::ReleaseCallback m_releaseMailbox1; 221 TextureMailbox::ReleaseCallback m_releaseMailbox1;
222 TextureMailbox::ReleaseCallback m_releaseMailbox2; 222 TextureMailbox::ReleaseCallback m_releaseMailbox2;
223 TextureMailbox m_mailbox1; 223 TextureMailbox m_mailbox1;
224 TextureMailbox m_mailbox2; 224 TextureMailbox m_mailbox2;
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 EXPECT_CALL(m_testData.m_mockCallback, Release(_, _)).Times(0); 486 EXPECT_CALL(m_testData.m_mockCallback, Release(_, _)).Times(0);
487 provider->deleteResource(id); 487 provider->deleteResource(id);
488 Mock::VerifyAndClearExpectations(&m_testData.m_mockCallback); 488 Mock::VerifyAndClearExpectations(&m_testData.m_mockCallback);
489 EXPECT_CALL(m_testData.m_mockCallback, 489 EXPECT_CALL(m_testData.m_mockCallback,
490 Release(m_testData.m_mailboxName1, _)).Times(1); 490 Release(m_testData.m_mailboxName1, _)).Times(1);
491 provider->receiveFromParent(list); 491 provider->receiveFromParent(list);
492 } 492 }
493 493
494 } // namespace 494 } // namespace
495 } // namespace cc 495 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resource_provider_unittest.cc ('k') | cc/texture_mailbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698