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

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

Issue 2591363002: Adding drawable to CRD andorid and iOS gl rendering pipeline. (Closed)
Patch Set: Trying to fix android. 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 41736aed0193c7700b2fff1081c0f58973ff7ffa..d9a5e89f0f833a57cc2d8ca5096c92e3aea8ebac 100644
--- a/remoting/client/display/gl_cursor_feedback.cc
+++ b/remoting/client/display/gl_cursor_feedback.cc
@@ -9,7 +9,7 @@
#include <array>
#include "base/logging.h"
-#include "remoting/client/display/gl_canvas.h"
+#include "remoting/client/display/canvas.h"
#include "remoting/client/display/gl_cursor_feedback_texture.h"
#include "remoting/client/display/gl_math.h"
#include "remoting/client/display/gl_render_layer.h"
@@ -43,11 +43,13 @@ float GetExpansionCoefficient(float progress) {
namespace remoting {
-GlCursorFeedback::GlCursorFeedback() {}
+GlCursorFeedback::GlCursorFeedback() : weak_factory_(this) {
+ SetZIndex(DrawableZIndex::CURSOR_FEEDBACK);
+}
GlCursorFeedback::~GlCursorFeedback() {}
-void GlCursorFeedback::SetCanvas(GlCanvas* canvas) {
+void GlCursorFeedback::SetCanvas(Canvas* canvas) {
if (!canvas) {
layer_.reset();
return;
@@ -89,4 +91,8 @@ bool GlCursorFeedback::Draw() {
return true;
}
+base::WeakPtr<Drawable> GlCursorFeedback::GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+}
+
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698