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

Unified Diff: cc/texture_mailbox.cc

Issue 12471007: Part 8 of cc/ directory shuffles: resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/texture_mailbox.h ('k') | cc/texture_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/texture_mailbox.cc
diff --git a/cc/texture_mailbox.cc b/cc/texture_mailbox.cc
deleted file mode 100644
index b534605f77793a4583d376db2a1ea3cd4033b5cd..0000000000000000000000000000000000000000
--- a/cc/texture_mailbox.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/logging.h"
-#include "cc/texture_mailbox.h"
-
-namespace cc {
-
-TextureMailbox::TextureMailbox()
- : sync_point_(0) {
-}
-
-TextureMailbox::TextureMailbox(
- const std::string& mailbox_name,
- const ReleaseCallback& mailbox_callback)
- : callback_(mailbox_callback),
- sync_point_(0) {
- DCHECK(mailbox_name.empty() == mailbox_callback.is_null());
- if (!mailbox_name.empty()) {
- CHECK(mailbox_name.size() == sizeof(name_.name));
- name_.SetName(reinterpret_cast<const int8*>(mailbox_name.data()));
- }
-}
-
-TextureMailbox::TextureMailbox(
- const gpu::Mailbox& mailbox_name,
- const ReleaseCallback& mailbox_callback)
- : callback_(mailbox_callback),
- sync_point_(0) {
- DCHECK(mailbox_name.IsZero() == mailbox_callback.is_null());
- name_.SetName(mailbox_name.name);
-}
-
-TextureMailbox::TextureMailbox(
- const gpu::Mailbox& mailbox_name,
- const ReleaseCallback& mailbox_callback,
- unsigned sync_point)
- : callback_(mailbox_callback),
- sync_point_(sync_point) {
- DCHECK(mailbox_name.IsZero() == mailbox_callback.is_null());
- name_.SetName(mailbox_name.name);
-}
-
-TextureMailbox::~TextureMailbox() {
-}
-
-bool TextureMailbox::Equals(const gpu::Mailbox& other) const {
- return !memcmp(data(), other.name, sizeof(name_.name));
-}
-
-bool TextureMailbox::Equals(const TextureMailbox& other) const {
- return Equals(other.name());
-}
-
-bool TextureMailbox::IsEmpty() const {
- return name_.IsZero();
-}
-
-void TextureMailbox::RunReleaseCallback(unsigned sync_point) const {
- if (!callback_.is_null())
- callback_.Run(sync_point);
-}
-
-void TextureMailbox::SetName(const gpu::Mailbox& other) {
- name_.SetName(other.name);
-}
-
-} // namespace cc
« no previous file with comments | « cc/texture_mailbox.h ('k') | cc/texture_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698