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, |