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

Unified Diff: remoting/client/plugin/pepper_view.cc

Issue 17511004: Added the desktop shape fields to VideoPacket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback. Created 7 years, 6 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 | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/rectangle_update_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/plugin/pepper_view.cc
diff --git a/remoting/client/plugin/pepper_view.cc b/remoting/client/plugin/pepper_view.cc
index b2c8ac34cb6455165db017b479e5081607a4c47d..9f07a7dc7ec600c09d8d83b96b6ecbdc652401c1 100644
--- a/remoting/client/plugin/pepper_view.cc
+++ b/remoting/client/plugin/pepper_view.cc
@@ -104,7 +104,7 @@ void PepperView::SetView(const pp::View& view) {
// Create a 2D rendering context at the chosen frame dimensions.
pp::Size pp_size = pp::Size(view_size_.width(), view_size_.height());
- graphics2d_ = pp::Graphics2D(instance_, pp_size, true);
+ graphics2d_ = pp::Graphics2D(instance_, pp_size, false);
// Specify the scale from our coordinates to DIPs.
pp::Graphics2D_Dev graphics2d_dev(graphics2d_);
@@ -278,6 +278,11 @@ void PepperView::FlushBuffer(const SkIRect& clip_area,
&PepperView::OnFlushDone, AsWeakPtr(), start_time, buffer)));
CHECK(error == PP_OK_COMPLETIONPENDING);
flush_pending_ = true;
+
+ // If the buffer we just rendered has a shape then pass that to JavaScript.
+ const SkRegion* buffer_shape = producer_->GetBufferShape();
+ if (buffer_shape)
+ instance_->SetDesktopShape(*buffer_shape);
}
void PepperView::OnFlushDone(base::Time paint_start,
« no previous file with comments | « remoting/client/plugin/chromoting_instance.cc ('k') | remoting/client/rectangle_update_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698