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

Side by Side Diff: cc/texture_mailbox.cc

Issue 11888010: Cosmetic cleanup to texture_layer mailboxes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Comments 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/logging.h"
6 #include "cc/texture_mailbox.h"
7
8 namespace cc {
9
10 TextureMailbox::TextureMailbox() {
11 }
12
13 TextureMailbox::TextureMailbox(
14 const std::string& mailbox_name,
15 const ReleaseCallback& mailbox_callback)
16 : name_(mailbox_name),
17 callback_(mailbox_callback) {
18 DCHECK(name_.empty() == callback_.is_null());
19 }
20
21 TextureMailbox::~TextureMailbox() {
22 }
23
24 bool TextureMailbox::Equals(const TextureMailbox& other) const {
25 return (name_.compare(other.name_) == 0);
26 }
27
28 const int8* TextureMailbox::Data() const {
29 return reinterpret_cast<const int8*>(name_.data());
30 }
31
32 bool TextureMailbox::IsEmpty() const {
33 return name_.empty();
34 }
35
36 void TextureMailbox::RunReleaseCallback(unsigned sync_point) const {
37 if (!callback_.is_null())
38 callback_.Run(sync_point);
39 }
40
41 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698