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

Side by Side Diff: content/renderer/media/stream_texture_factory_impl_android.cc

Issue 16907002: Update Android to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/media/stream_texture_factory_impl_android.h" 5 #include "content/renderer/media/stream_texture_factory_impl_android.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 StreamTextureProxyImpl::StreamTextureProxyImpl( 50 StreamTextureProxyImpl::StreamTextureProxyImpl(
51 content::StreamTextureHost* host) 51 content::StreamTextureHost* host)
52 : host_(host), 52 : host_(host),
53 client_(NULL) { 53 client_(NULL) {
54 DCHECK(host); 54 DCHECK(host);
55 host->SetListener(this); 55 host->SetListener(this);
56 } 56 }
57 57
58 void StreamTextureProxyImpl::Release() { 58 void StreamTextureProxyImpl::Release() {
59 SetClient(NULL); 59 SetClient(NULL);
60 if (loop_ && loop_ != base::MessageLoopProxy::current()) 60 if (loop_.get() && loop_.get() != base::MessageLoopProxy::current())
61 loop_->DeleteSoon(FROM_HERE, this); 61 loop_->DeleteSoon(FROM_HERE, this);
62 else 62 else
63 delete this; 63 delete this;
64 } 64 }
65 65
66 void StreamTextureProxyImpl::SetClient(cc::VideoFrameProvider::Client* client) { 66 void StreamTextureProxyImpl::SetClient(cc::VideoFrameProvider::Client* client) {
67 base::AutoLock lock(client_lock_); 67 base::AutoLock lock(client_lock_);
68 client_ = client; 68 client_ = client;
69 } 69 }
70 70
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 128
129 void StreamTextureFactoryImpl::DestroyStreamTexture(unsigned texture_id) { 129 void StreamTextureFactoryImpl::DestroyStreamTexture(unsigned texture_id) {
130 if (context_->makeContextCurrent()) { 130 if (context_->makeContextCurrent()) {
131 context_->destroyStreamTextureCHROMIUM(texture_id); 131 context_->destroyStreamTextureCHROMIUM(texture_id);
132 context_->deleteTexture(texture_id); 132 context_->deleteTexture(texture_id);
133 context_->flush(); 133 context_->flush();
134 } 134 }
135 } 135 }
136 136
137 } // namespace content 137 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/java/java_bridge_dispatcher.cc ('k') | content/renderer/media/webrtc_local_audio_track.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698