| Index: remoting/client/display/gl_desktop.cc
|
| diff --git a/remoting/client/display/gl_desktop.cc b/remoting/client/display/gl_desktop.cc
|
| index 41cb463209dfc4f1dbf716008bfebbd14eebb21b..946e7105000c3c7918cd6e751bf173de717d60cd 100644
|
| --- a/remoting/client/display/gl_desktop.cc
|
| +++ b/remoting/client/display/gl_desktop.cc
|
| @@ -57,7 +57,9 @@ struct GlDesktop::GlDesktopTextureContainer {
|
| webrtc::DesktopRect rect;
|
| };
|
|
|
| -GlDesktop::GlDesktop() : weak_factory_(this) {}
|
| +GlDesktop::GlDesktop() : weak_factory_(this) {
|
| + weak_ptr_ = weak_factory_.GetWeakPtr();
|
| +}
|
|
|
| GlDesktop::~GlDesktop() {}
|
|
|
| @@ -84,7 +86,6 @@ void GlDesktop::SetVideoFrame(const webrtc::DesktopFrame& frame) {
|
| }
|
|
|
| bool GlDesktop::Draw() {
|
| - DCHECK(thread_checker_.CalledOnValidThread());
|
| if (!textures_.empty() && !last_desktop_size_.is_empty()) {
|
| for (std::unique_ptr<GlDesktopTextureContainer>& texture : textures_) {
|
| texture->layer->Draw(1.0f);
|
| @@ -132,8 +133,7 @@ void GlDesktop::ReallocateTextures(const webrtc::DesktopSize& size) {
|
| }
|
|
|
| base::WeakPtr<Drawable> GlDesktop::GetWeakPtr() {
|
| - DCHECK(thread_checker_.CalledOnValidThread());
|
| - return weak_factory_.GetWeakPtr();
|
| + return weak_ptr_;
|
| }
|
|
|
| } // namespace remoting
|
|
|