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

Unified Diff: remoting/client/display/gl_cursor_feedback.cc

Issue 2623413004: [Remoting Android] Fix thread issue with OpenGL drawable (Closed)
Patch Set: PTAL Point Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/display/gl_cursor_feedback.cc
diff --git a/remoting/client/display/gl_cursor_feedback.cc b/remoting/client/display/gl_cursor_feedback.cc
index 978042117db3902971d25044c4bf6f436a941313..f8dacf7fd67be93ae355680d1866961c12e18461 100644
--- a/remoting/client/display/gl_cursor_feedback.cc
+++ b/remoting/client/display/gl_cursor_feedback.cc
@@ -43,7 +43,9 @@ float GetExpansionCoefficient(float progress) {
namespace remoting {
-GlCursorFeedback::GlCursorFeedback() : weak_factory_(this) {}
+GlCursorFeedback::GlCursorFeedback() : weak_factory_(this) {
+ weak_ptr_ = weak_factory_.GetWeakPtr();
+}
GlCursorFeedback::~GlCursorFeedback() {}
@@ -67,7 +69,6 @@ void GlCursorFeedback::StartAnimation(float x, float y, float diameter) {
}
bool GlCursorFeedback::Draw() {
- DCHECK(thread_checker_.CalledOnValidThread());
if (!layer_ || animation_start_time_.is_null()) {
return false;
}
@@ -95,8 +96,7 @@ int GlCursorFeedback::GetZIndex() {
}
base::WeakPtr<Drawable> GlCursorFeedback::GetWeakPtr() {
- DCHECK(thread_checker_.CalledOnValidThread());
- return weak_factory_.GetWeakPtr();
+ return weak_ptr_;
}
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698