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

Side by Side Diff: gpu/command_buffer/common/mailbox.cc

Issue 105743004: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: c301e01d Rebase. Created 6 years, 11 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "gpu/command_buffer/common/mailbox.h" 5 #include "gpu/command_buffer/common/mailbox.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 13 matching lines...) Expand all
24 24
25 void Mailbox::SetZero() { 25 void Mailbox::SetZero() {
26 memset(name, 0, sizeof(name)); 26 memset(name, 0, sizeof(name));
27 } 27 }
28 28
29 void Mailbox::SetName(const int8* n) { 29 void Mailbox::SetName(const int8* n) {
30 DCHECK(IsZero() || !memcmp(name, n, sizeof(name))); 30 DCHECK(IsZero() || !memcmp(name, n, sizeof(name)));
31 memcpy(name, n, sizeof(name)); 31 memcpy(name, n, sizeof(name));
32 } 32 }
33 33
34 MailboxHolder::MailboxHolder() : texture_target(0), sync_point(0) {}
35
36 MailboxHolder::MailboxHolder(const Mailbox& mailbox,
37 uint32 texture_target,
38 uint32 sync_point)
39 : mailbox(mailbox),
40 texture_target(texture_target),
41 sync_point(sync_point) {}
42
34 } // namespace gpu 43 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698