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

Side by Side Diff: cc/transferable_resource.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
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() {
11 memset(name, 0, sizeof(name));
12 }
13
14 bool Mailbox::isZero() const {
15 for (int i = 0; i < arraysize(name); ++i) {
16 if (name[i])
17 return false;
18 }
19 return true;
20 }
21
22 void Mailbox::setName(const int8* n) {
23 DCHECK(isZero() || !memcmp(name, n, sizeof(name)));
24 memcpy(name, n, sizeof(name));
25 }
26
27 TransferableResource::TransferableResource() 10 TransferableResource::TransferableResource()
28 : id(0), 11 : id(0),
29 sync_point(0), 12 sync_point(0),
30 format(0), 13 format(0),
31 filter(0) { 14 filter(0) {
32 } 15 }
33 16
34 TransferableResource::~TransferableResource() { 17 TransferableResource::~TransferableResource() {
35 } 18 }
36 19
37 } // namespace cc 20 } // namespace cc
OLDNEW
« no previous file with comments | « cc/transferable_resource.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698