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

Unified Diff: remoting/client/gl_cursor.cc

Issue 2591363002: Adding drawable to CRD andorid and iOS gl rendering pipeline. (Closed)
Patch Set: Minor cleanup of an unused const. Created 4 years 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/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

Powered by Google App Engine
This is Rietveld 408576698