Index: content/browser/aura/software_browser_compositor_output_surface.h |
diff --git a/content/browser/aura/software_browser_compositor_output_surface.h b/content/browser/aura/software_browser_compositor_output_surface.h |
index ac499da5eb2c75fdc82ef8e6b618e885ead75aff..79c7901f05585e12e2bea8fad4f02d4ea53fffcc 100644 |
--- a/content/browser/aura/software_browser_compositor_output_surface.h |
+++ b/content/browser/aura/software_browser_compositor_output_surface.h |
@@ -2,32 +2,49 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_BROWSER_AURA_SOFTWARE_OUTPUT_SURFACE_H_ |
-#define CONTENT_BROWSER_AURA_SOFTWARE_OUTPUT_SURFACE_H_ |
+#ifndef CONTENT_BROWSER_AURA_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
+#define CONTENT_BROWSER_AURA_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |
-#include "cc/output/output_surface.h" |
+#include "base/memory/weak_ptr.h" |
+#include "content/browser/aura/browser_compositor_output_surface.h" |
+#include "content/common/content_export.h" |
+#include "ui/compositor/compositor.h" |
-namespace cc { class SoftwareOutputDevice; } |
+namespace base { |
+class MessageLoopProxy; |
+} |
+ |
+namespace cc { |
+class SoftwareOutputDevice; |
+} |
namespace content { |
-// TODO(danakj): Inherit from BrowserCompositorOutputSurface to share stuff like |
-// reflectors, when we split the GL-specific stuff out of the class. |
-class SoftwareBrowserCompositorOutputSurface : public cc::OutputSurface { |
+class BrowserCompositorOutputSurfaceProxy; |
+ |
+class CONTENT_EXPORT SoftwareBrowserCompositorOutputSurface |
+ : public BrowserCompositorOutputSurface { |
public: |
- static scoped_ptr<SoftwareBrowserCompositorOutputSurface> Create( |
- scoped_ptr<cc::SoftwareOutputDevice> software_device) { |
- return make_scoped_ptr( |
- new SoftwareBrowserCompositorOutputSurface(software_device.Pass())); |
- } |
+ SoftwareBrowserCompositorOutputSurface( |
+ scoped_refptr<BrowserCompositorOutputSurfaceProxy> surface_proxy, |
+ scoped_ptr<cc::SoftwareOutputDevice> software_device, |
+ int surface_id, |
+ IDMap<BrowserCompositorOutputSurface>* output_surface_map, |
+ base::MessageLoopProxy* compositor_message_loop, |
+ base::WeakPtr<ui::Compositor> compositor); |
- private: |
- explicit SoftwareBrowserCompositorOutputSurface( |
- scoped_ptr<cc::SoftwareOutputDevice> software_device); |
+ virtual ~SoftwareBrowserCompositorOutputSurface(); |
+ private: |
virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; |
+ |
+ // On the software path we need to explicitly call the proxy to update the |
+ // VSync parameters. |
+ scoped_refptr<BrowserCompositorOutputSurfaceProxy> output_surface_proxy_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(SoftwareBrowserCompositorOutputSurface); |
}; |
} // namespace content |
-#endif // CONTENT_BROWSER_AURA_SOFTWARE_OUTPUT_SURFACE_H_ |
+#endif // CONTENT_BROWSER_AURA_SOFTWARE_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_ |