Index: content/browser/aura/reflector_impl.h |
diff --git a/content/browser/aura/reflector_impl.h b/content/browser/aura/reflector_impl.h |
index b24acffd4043b8e38c8db3091513f45ca7fb994f..8fca59c962080851ffaf97335e9f8c40e8f04105 100644 |
--- a/content/browser/aura/reflector_impl.h |
+++ b/content/browser/aura/reflector_impl.h |
@@ -8,6 +8,7 @@ |
#include "base/id_map.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/memory/weak_ptr.h" |
+#include "content/browser/aura/browser_compositor_output_surface_capturer.h" |
#include "content/browser/aura/image_transport_factory.h" |
#include "ui/compositor/reflector.h" |
#include "ui/gfx/size.h" |
@@ -23,13 +24,12 @@ class Layer; |
namespace content { |
-class BrowserCompositorOutputSurface; |
- |
// A reflector implementation that copies the framebuffer content |
// to the texture, then draw it onto the mirroring compositor. |
class ReflectorImpl : public ImageTransportFactoryObserver, |
public base::SupportsWeakPtr<ReflectorImpl>, |
- public ui::Reflector { |
+ public ui::Reflector, |
+ public BrowserCompositorOutputSurface::Observer { |
public: |
ReflectorImpl( |
ui::Compositor* mirrored_compositor, |
@@ -55,19 +55,11 @@ class ReflectorImpl : public ImageTransportFactoryObserver, |
// ImageTransportFactoryObsever implementation. |
virtual void OnLostResources() OVERRIDE; |
- // Called when the output surface's size has changed. |
- // This must be called on ImplThread. |
- void OnReshape(gfx::Size size); |
- |
- // Called in |BrowserCompositorOutputSurface::SwapBuffers| to copy |
- // the full screen image to the |texture_id_|. This must be called |
- // on ImplThread. |
- void OnSwapBuffers(); |
- |
- // Called in |BrowserCompositorOutputSurface::PostSubBuffer| copy |
- // the sub image given by |rect| to the texture.This must be called |
- // on ImplThread. |
- void OnPostSubBuffer(gfx::Rect rect); |
+ // BrowserCompositorOutputSurface::Observer implementation. |
+ virtual void OnReshape(const gfx::Size& size) OVERRIDE; |
+ virtual void OnSwapBuffers() OVERRIDE; |
+ virtual void OnPostSubBuffer(const gfx::Rect& rect) OVERRIDE; |
+ virtual void OnDelete() OVERRIDE; |
// Create a shared texture that will be used to copy the content of |
// mirrored compositor to the mirroring compositor. This must be |
@@ -75,7 +67,6 @@ class ReflectorImpl : public ImageTransportFactoryObserver, |
// race with ImplThread accessing |texture_id_|. |
void CreateSharedTexture(); |
- |
private: |
virtual ~ReflectorImpl(); |