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

Unified Diff: remoting/client/gl_desktop.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_desktop.cc
diff --git a/remoting/client/gl_desktop.cc b/remoting/client/gl_desktop.cc
index 72bd9ec15201e615fb2ab46b146e63ce180fe265..6b331b108d404b4cbd58cd4b90152e48345f8a3a 100644
--- a/remoting/client/gl_desktop.cc
+++ b/remoting/client/gl_desktop.cc
@@ -57,7 +57,9 @@ struct GlDesktop::GlDesktopTextureContainer {
webrtc::DesktopRect rect;
};
-GlDesktop::GlDesktop() {}
+GlDesktop::GlDesktop() : weak_factory_(this) {
+ SetZIndex(DrawableZIndex::DESKTOP);
+}
GlDesktop::~GlDesktop() {}
@@ -83,12 +85,13 @@ void GlDesktop::SetVideoFrame(const webrtc::DesktopFrame& frame) {
}
}
-void GlDesktop::Draw() {
+bool GlDesktop::Draw() {
if (!textures_.empty() && !last_desktop_size_.is_empty()) {
for (std::unique_ptr<GlDesktopTextureContainer>& texture : textures_) {
texture->layer->Draw(1.0f);
}
}
+ return false;
}
void GlDesktop::ReallocateTextures(const webrtc::DesktopSize& size) {
@@ -124,4 +127,8 @@ void GlDesktop::ReallocateTextures(const webrtc::DesktopSize& size) {
}
}
+base::WeakPtr<GlDrawable> GlDesktop::GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+}
+
} // namespace remoting

Powered by Google App Engine
This is Rietveld 408576698