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

Unified Diff: remoting/base/decoder_vp8.cc

Issue 9583020: Disable rendering on up-scale. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pick nits. Created 8 years, 10 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/plugin/pepper_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/decoder_vp8.cc
diff --git a/remoting/base/decoder_vp8.cc b/remoting/base/decoder_vp8.cc
index 88ea3b6afa0f733495108904053d5474fbf16936..d4c58075cb2d8cb07922fb37c75aa23330166363 100644
--- a/remoting/base/decoder_vp8.cc
+++ b/remoting/base/decoder_vp8.cc
@@ -121,6 +121,15 @@ void DecoderVp8::RenderFrame(const SkISize& view_size,
SkRegion* output_region) {
SkIRect source_clip = SkIRect::MakeWH(last_image_->d_w, last_image_->d_h);
+ // ScaleYUVToRGB32WithRect doesn't support up-scaling, and our web-app never
+ // intentionally up-scales, so if we see up-scaling (e.g. during host resize
+ // or if the user applies page zoom) just don't render anything.
+ // TODO(wez): Remove this hack when ScaleYUVToRGB32WithRect can up-scale.
+ if (source_clip.width() < view_size.width() ||
+ source_clip.height() < view_size.height()) {
+ return;
+ }
+
for (SkRegion::Iterator i(updated_region_); !i.done(); i.next()) {
// Determine the scaled area affected by this rectangle changing.
SkIRect rect = i.rect();
« no previous file with comments | « no previous file | remoting/client/plugin/pepper_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698