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

Side by Side Diff: remoting/client/display/gl_desktop.cc

Issue 2886453004: Adding ThreadChecker validation to d'tors for client classes (Closed)
Patch Set: Created 3 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
« no previous file with comments | « remoting/client/display/gl_cursor_feedback.cc ('k') | remoting/client/display/gl_renderer.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "remoting/client/display/gl_desktop.h" 5 #include "remoting/client/display/gl_desktop.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "remoting/client/display/canvas.h" 9 #include "remoting/client/display/canvas.h"
10 #include "remoting/client/display/gl_math.h" 10 #include "remoting/client/display/gl_math.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 } // namespace 53 } // namespace
54 54
55 struct GlDesktop::GlDesktopTextureContainer { 55 struct GlDesktop::GlDesktopTextureContainer {
56 std::unique_ptr<GlRenderLayer> layer; 56 std::unique_ptr<GlRenderLayer> layer;
57 webrtc::DesktopRect rect; 57 webrtc::DesktopRect rect;
58 }; 58 };
59 59
60 GlDesktop::GlDesktop() : weak_factory_(this) {} 60 GlDesktop::GlDesktop() : weak_factory_(this) {}
61 61
62 GlDesktop::~GlDesktop() {} 62 GlDesktop::~GlDesktop() {
63 DCHECK(thread_checker_.CalledOnValidThread());
64 }
63 65
64 void GlDesktop::SetCanvas(base::WeakPtr<Canvas> canvas) { 66 void GlDesktop::SetCanvas(base::WeakPtr<Canvas> canvas) {
65 last_desktop_size_.set(0, 0); 67 last_desktop_size_.set(0, 0);
66 textures_.clear(); 68 textures_.clear();
67 canvas_ = canvas; 69 canvas_ = canvas;
68 if (canvas) { 70 if (canvas) {
69 max_texture_size_ = canvas->GetMaxTextureSize(); 71 max_texture_size_ = canvas->GetMaxTextureSize();
70 } 72 }
71 } 73 }
72 74
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 132 }
131 } 133 }
132 } 134 }
133 135
134 base::WeakPtr<Drawable> GlDesktop::GetWeakPtr() { 136 base::WeakPtr<Drawable> GlDesktop::GetWeakPtr() {
135 DCHECK(thread_checker_.CalledOnValidThread()); 137 DCHECK(thread_checker_.CalledOnValidThread());
136 return weak_factory_.GetWeakPtr(); 138 return weak_factory_.GetWeakPtr();
137 } 139 }
138 140
139 } // namespace remoting 141 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/display/gl_cursor_feedback.cc ('k') | remoting/client/display/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698