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

Unified Diff: remoting/client/desktop_viewport.cc

Issue 2874143002: [CRD iOS] Some fixes for rendering (Closed)
Patch Set: Just use presentRenderbuffer to swap buffers Created 3 years, 7 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
« no previous file with comments | « no previous file | remoting/client/display/canvas.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/desktop_viewport.cc
diff --git a/remoting/client/desktop_viewport.cc b/remoting/client/desktop_viewport.cc
index 38895a2a7f0293a178e319be020d4cdbbd31552c..c6ffd38b6dcd42efb7d1780e284702d2040eaf12 100644
--- a/remoting/client/desktop_viewport.cc
+++ b/remoting/client/desktop_viewport.cc
@@ -21,12 +21,20 @@ DesktopViewport::DesktopViewport() : desktop_to_surface_transform_() {}
DesktopViewport::~DesktopViewport() {}
void DesktopViewport::SetDesktopSize(int desktop_width, int desktop_height) {
+ if (desktop_width == desktop_size_.x && desktop_height == desktop_size_.y) {
+ return;
+ }
+
desktop_size_.x = desktop_width;
desktop_size_.y = desktop_height;
ResizeToFit();
}
void DesktopViewport::SetSurfaceSize(int surface_width, int surface_height) {
+ if (surface_width == surface_size_.x && surface_height == surface_size_.y) {
+ return;
+ }
+
surface_size_.x = surface_width;
surface_size_.y = surface_height;
ResizeToFit();
« no previous file with comments | « no previous file | remoting/client/display/canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698