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

Unified Diff: content/browser/compositor/gpu_browser_compositor_output_surface.cc

Issue 2797443003: Fix screen mirroring on Chrome OS (ReflectorTexture partial swap) (Closed)
Patch Set: Track texture status in output surface class Created 3 years, 9 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 | « content/browser/compositor/gpu_browser_compositor_output_surface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/gpu_browser_compositor_output_surface.cc
diff --git a/content/browser/compositor/gpu_browser_compositor_output_surface.cc b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
index 4cdfbb78650dd035d8ff2b8659dc75090cd89159..894a70a08641095f378e5a6d09f4cae8f10a964b 100644
--- a/content/browser/compositor/gpu_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/gpu_browser_compositor_output_surface.cc
@@ -65,6 +65,7 @@ void GpuBrowserCompositorOutputSurface::OnReflectorChanged() {
reflector_texture_.reset(new ReflectorTexture(context_provider()));
reflector_->OnSourceTextureMailboxUpdated(reflector_texture_->mailbox());
}
+ reflector_texture_defined_ = false;
}
void GpuBrowserCompositorOutputSurface::BindToClient(
@@ -108,12 +109,13 @@ void GpuBrowserCompositorOutputSurface::SwapBuffers(
gfx::Size surface_size = frame.size;
if (reflector_) {
- if (frame.sub_buffer_rect) {
+ if (frame.sub_buffer_rect && reflector_texture_defined_) {
reflector_texture_->CopyTextureSubImage(*frame.sub_buffer_rect);
reflector_->OnSourcePostSubBuffer(*frame.sub_buffer_rect, surface_size);
} else {
reflector_texture_->CopyTextureFullImage(surface_size);
reflector_->OnSourceSwapBuffers(surface_size);
+ reflector_texture_defined_ = true;
}
}
« no previous file with comments | « content/browser/compositor/gpu_browser_compositor_output_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698