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

Side by Side Diff: cc/resources/texture_mailbox.cc

Issue 15826003: cc: Fix uninitialized field in TextureMailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
« no previous file with comments | « no previous file | 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 2013 The Chromium Authors. All rights reserved. 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 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 "cc/resources/texture_mailbox.h" 5 #include "cc/resources/texture_mailbox.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "third_party/khronos/GLES2/gl2.h" 8 #include "third_party/khronos/GLES2/gl2.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 TextureMailbox::TextureMailbox() 12 TextureMailbox::TextureMailbox()
13 : sync_point_(0) { 13 : target_(GL_TEXTURE_2D),
14 sync_point_(0) {
14 } 15 }
15 16
16 TextureMailbox::TextureMailbox( 17 TextureMailbox::TextureMailbox(
17 const std::string& mailbox_name, 18 const std::string& mailbox_name,
18 const ReleaseCallback& mailbox_callback) 19 const ReleaseCallback& mailbox_callback)
19 : callback_(mailbox_callback), 20 : callback_(mailbox_callback),
20 target_(GL_TEXTURE_2D), 21 target_(GL_TEXTURE_2D),
21 sync_point_(0) { 22 sync_point_(0) {
22 DCHECK(mailbox_name.empty() == mailbox_callback.is_null()); 23 DCHECK(mailbox_name.empty() == mailbox_callback.is_null());
23 if (!mailbox_name.empty()) { 24 if (!mailbox_name.empty()) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 bool lost_resource) const { 79 bool lost_resource) const {
79 if (!callback_.is_null()) 80 if (!callback_.is_null())
80 callback_.Run(sync_point, lost_resource); 81 callback_.Run(sync_point, lost_resource);
81 } 82 }
82 83
83 void TextureMailbox::SetName(const gpu::Mailbox& other) { 84 void TextureMailbox::SetName(const gpu::Mailbox& other) {
84 name_.SetName(other.name); 85 name_.SetName(other.name);
85 } 86 }
86 87
87 } // namespace cc 88 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698