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

Side by Side Diff: cc/transferable_resource.cc

Issue 11638028: Mailbox support for texture layers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests Created 7 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
« cc/texture_layer_unittest.cc ('K') | « cc/transferable_resource.h ('k') | no next file » | 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "cc/transferable_resource.h" 6 #include "cc/transferable_resource.h"
7 7
8 namespace cc { 8 namespace cc {
9 9
10 Mailbox::Mailbox() { 10 Mailbox::Mailbox() {
11 memset(name, 0, sizeof(name)); 11 memset(name, 0, sizeof(name));
12 } 12 }
13 13
14 Mailbox::~Mailbox() {
15 }
16
14 bool Mailbox::isZero() const { 17 bool Mailbox::isZero() const {
15 for (int i = 0; i < arraysize(name); ++i) { 18 for (int i = 0; i < arraysize(name); ++i) {
16 if (name[i]) 19 if (name[i])
17 return false; 20 return false;
18 } 21 }
19 return true; 22 return true;
20 } 23 }
21 24
22 void Mailbox::setName(const int8* n) { 25 void Mailbox::setName(const int8* n) {
23 DCHECK(isZero() || !memcmp(name, n, sizeof(name))); 26 DCHECK(isZero() || !memcmp(name, n, sizeof(name)));
(...skipping 10 matching lines...) Expand all
34 } 37 }
35 38
36 TransferableResourceList::TransferableResourceList() 39 TransferableResourceList::TransferableResourceList()
37 : sync_point(0) { 40 : sync_point(0) {
38 } 41 }
39 42
40 TransferableResourceList::~TransferableResourceList() { 43 TransferableResourceList::~TransferableResourceList() {
41 } 44 }
42 45
43 } // namespace cc 46 } // namespace cc
OLDNEW
« cc/texture_layer_unittest.cc ('K') | « cc/transferable_resource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698