| Index: remoting/client/display/gl_desktop.cc
|
| diff --git a/remoting/client/display/gl_desktop.cc b/remoting/client/display/gl_desktop.cc
|
| index e033d54b36a588e207ac45ed50060a0801e1f867..28f9c5eaa6688269bb1b428d87630e1761763396 100644
|
| --- a/remoting/client/display/gl_desktop.cc
|
| +++ b/remoting/client/display/gl_desktop.cc
|
| @@ -6,7 +6,7 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/memory/ptr_util.h"
|
| -#include "remoting/client/display/gl_canvas.h"
|
| +#include "remoting/client/display/canvas.h"
|
| #include "remoting/client/display/gl_math.h"
|
| #include "remoting/client/display/gl_render_layer.h"
|
| #include "remoting/client/display/gl_texture_ids.h"
|
| @@ -57,11 +57,13 @@ struct GlDesktop::GlDesktopTextureContainer {
|
| webrtc::DesktopRect rect;
|
| };
|
|
|
| -GlDesktop::GlDesktop() {}
|
| +GlDesktop::GlDesktop() : weak_factory_(this) {
|
| + SetZIndex(DrawableZIndex::DESKTOP);
|
| +}
|
|
|
| GlDesktop::~GlDesktop() {}
|
|
|
| -void GlDesktop::SetCanvas(GlCanvas* canvas) {
|
| +void GlDesktop::SetCanvas(Canvas* canvas) {
|
| last_desktop_size_.set(0, 0);
|
| textures_.clear();
|
| canvas_ = canvas;
|
| @@ -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<Drawable> GlDesktop::GetWeakPtr() {
|
| + return weak_factory_.GetWeakPtr();
|
| +}
|
| +
|
| } // namespace remoting
|
|
|