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

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

Issue 1123763003: Draw the offscreen texture to reflector's surface without extra copy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: content/browser/compositor/gpu_browser_compositor_output_surface.h
diff --git a/content/browser/compositor/gpu_browser_compositor_output_surface.h b/content/browser/compositor/gpu_browser_compositor_output_surface.h
index 2b3d2b76dbf68bbaecd5767c93d488f7431f09cc..d91bcda3a7b952a0364dede51e2f0538714f6232 100644
--- a/content/browser/compositor/gpu_browser_compositor_output_surface.h
+++ b/content/browser/compositor/gpu_browser_compositor_output_surface.h
@@ -15,6 +15,8 @@ class CompositorVSyncManager;
namespace content {
class CommandBufferProxyImpl;
class BrowserCompositorOverlayCandidateValidator;
+class GLHelper;
+class OwnedMailbox;
// Adapts a WebGraphicsContext3DCommandBufferImpl into a
// cc::OutputSurface that also handles vsync parameter updates
@@ -31,10 +33,15 @@ class GpuBrowserCompositorOutputSurface
~GpuBrowserCompositorOutputSurface() override;
protected:
+ // BrowserCompositorOutputSurface:
+ void OnReflectorChanged() override;
+
// cc::OutputSurface implementation.
void SwapBuffers(cc::CompositorFrame* frame) override;
bool BindToClient(cc::OutputSurfaceClient* client) override;
+ void DeleteTexture();
+
#if defined(OS_MACOSX)
void OnSurfaceDisplayed() override;
void SetSurfaceSuspendedForRecycle(bool suspended) override;
@@ -62,6 +69,11 @@ class GpuBrowserCompositorOutputSurface
base::TimeDelta interval)>
update_vsync_parameters_callback_;
+ // Texture for mirroring.
+ scoped_refptr<OwnedMailbox> mailbox_;
+ scoped_ptr<GLHelper> mirrored_compositor_gl_helper_;
+ int mirrored_compositor_gl_helper_texture_id_;
+
DISALLOW_COPY_AND_ASSIGN(GpuBrowserCompositorOutputSurface);
};

Powered by Google App Engine
This is Rietveld 408576698