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

Unified Diff: cc/transferable_resource.cc

Issue 11366123: Uber Comp: never change mailbox name associated with a texture object. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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
« cc/resource_provider.cc ('K') | « cc/transferable_resource.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/transferable_resource.cc
===================================================================
--- cc/transferable_resource.cc (revision 166046)
+++ cc/transferable_resource.cc (working copy)
@@ -2,10 +2,28 @@
// 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/transferable_resource.h"
namespace cc {
+Mailbox::Mailbox() {
+ memset(name, 0, sizeof(name));
+}
+
+bool Mailbox::isZero() const {
+ for (int i = 0; i < arraysize(name); ++i) {
+ if (name[i])
+ return false;
+ }
+ return true;
+}
+
+void Mailbox::setName(const GLbyte* n) {
+ DCHECK(isZero() || !memcmp(name, n, sizeof(name)));
+ memcpy(name, n, sizeof(name));
+}
+
TransferableResource::TransferableResource()
: id(0),
format(0) {
« cc/resource_provider.cc ('K') | « cc/transferable_resource.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698