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

Side by Side Diff: cc/layers/texture_layer_impl.cc

Issue 69343011: cc: Rationalize sync points and lost status for returned resources (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/layers/texture_layer.cc ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/layers/texture_layer_impl.h" 5 #include "cc/layers/texture_layer_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "cc/layers/quad_sink.h" 10 #include "cc/layers/quad_sink.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 const char* TextureLayerImpl::LayerTypeAsString() const { 223 const char* TextureLayerImpl::LayerTypeAsString() const {
224 return "cc::TextureLayerImpl"; 224 return "cc::TextureLayerImpl";
225 } 225 }
226 226
227 void TextureLayerImpl::FreeTextureMailbox() { 227 void TextureLayerImpl::FreeTextureMailbox() {
228 if (!uses_mailbox_) 228 if (!uses_mailbox_)
229 return; 229 return;
230 if (own_mailbox_) { 230 if (own_mailbox_) {
231 DCHECK(!external_texture_resource_); 231 DCHECK(!external_texture_resource_);
232 if (release_callback_) 232 if (release_callback_)
233 release_callback_->Run(texture_mailbox_.sync_point(), false); 233 release_callback_->Run(0, false);
234 texture_mailbox_ = TextureMailbox(); 234 texture_mailbox_ = TextureMailbox();
235 release_callback_.reset(); 235 release_callback_.reset();
236 } else if (external_texture_resource_) { 236 } else if (external_texture_resource_) {
237 DCHECK(!own_mailbox_); 237 DCHECK(!own_mailbox_);
238 ResourceProvider* resource_provider = 238 ResourceProvider* resource_provider =
239 layer_tree_impl()->resource_provider(); 239 layer_tree_impl()->resource_provider();
240 resource_provider->DeleteResource(external_texture_resource_); 240 resource_provider->DeleteResource(external_texture_resource_);
241 external_texture_resource_ = 0; 241 external_texture_resource_ = 0;
242 } 242 }
243 } 243 }
244 244
245 } // namespace cc 245 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer.cc ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698