Index: remoting/client/gl_cursor.cc |
diff --git a/remoting/client/gl_cursor.cc b/remoting/client/gl_cursor.cc |
index 152923ad468d9607f2565ef69faa69e34e11148d..3cac7bbe961e3e73991ac3eeaf370cbc045b9428 100644 |
--- a/remoting/client/gl_cursor.cc |
+++ b/remoting/client/gl_cursor.cc |
@@ -18,7 +18,9 @@ namespace { |
const int kDefaultCursorDataSize = 32 * 32 * GlRenderLayer::kBytesPerPixel; |
} // namespace |
-GlCursor::GlCursor() {} |
+GlCursor::GlCursor() : weak_factory_(this) { |
+ SetZIndex(DrawableZIndex::CURSOR); |
+} |
GlCursor::~GlCursor() {} |
@@ -80,10 +82,11 @@ void GlCursor::SetCanvas(GlCanvas* canvas) { |
SetCursorPosition(cursor_x_, cursor_y_); |
} |
-void GlCursor::Draw() { |
+bool GlCursor::Draw() { |
if (layer_ && current_cursor_data_ && visible_) { |
layer_->Draw(1.f); |
} |
+ return false; |
} |
void GlCursor::SetCurrentCursorShape(bool size_changed) { |
@@ -98,4 +101,8 @@ void GlCursor::SetCurrentCursorShape(bool size_changed) { |
} |
} |
+base::WeakPtr<GlDrawable> GlCursor::GetWeakPtr() { |
+ return weak_factory_.GetWeakPtr(); |
+} |
+ |
} // namespace remoting |