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

Unified Diff: content/browser/aura/browser_compositor_output_surface.h

Issue 22935009: Add content::SurfaceCapturer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_stride
Patch Set: cff149b4 WIP Created 7 years, 4 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/aura/browser_compositor_output_surface.h
diff --git a/content/browser/aura/browser_compositor_output_surface.h b/content/browser/aura/browser_compositor_output_surface.h
index 4b891bdc2ef31e19e995f723bb357af1ca6b947e..c519cc3b8cb6ebf5b6f9f1f6a7a81815906f9c31 100644
--- a/content/browser/aura/browser_compositor_output_surface.h
+++ b/content/browser/aura/browser_compositor_output_surface.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_AURA_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
#include "base/id_map.h"
+#include "base/observer_list.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "cc/output/output_surface.h"
@@ -15,7 +16,9 @@ namespace base { class MessageLoopProxy; }
namespace ui { class Compositor; }
namespace content {
+class BrowserCompositorOutputSurfaceCapturer;
class ReflectorImpl;
+class WebGraphicsContext3DCommandBufferImpl;
// Adapts a WebGraphicsContext3DCommandBufferImpl into a
// cc::OutputSurface that also handles vsync parameter updates
@@ -28,7 +31,7 @@ class BrowserCompositorOutputSurface
scoped_ptr<WebKit::WebGraphicsContext3D> context,
int surface_id,
IDMap<BrowserCompositorOutputSurface>* output_surface_map,
- base::MessageLoopProxy* compositor_message_loop,
+ const scoped_refptr<base::MessageLoopProxy>& compositor_message_loop,
base::WeakPtr<ui::Compositor> compositor);
virtual ~BrowserCompositorOutputSurface();
@@ -43,6 +46,11 @@ class BrowserCompositorOutputSurface
void SetReflector(ReflectorImpl* reflector);
+ void AddCapturer(BrowserCompositorOutputSurfaceCapturer* capturer);
+ void RemoveCapturer(BrowserCompositorOutputSurfaceCapturer* capturer);
+
+ WebGraphicsContext3DCommandBufferImpl* GetContext3DCommandBufferImpl();
+
private:
int surface_id_;
IDMap<BrowserCompositorOutputSurface>* output_surface_map_;
@@ -50,6 +58,7 @@ class BrowserCompositorOutputSurface
scoped_refptr<base::MessageLoopProxy> compositor_message_loop_;
base::WeakPtr<ui::Compositor> compositor_;
scoped_refptr<ReflectorImpl> reflector_;
+ ObserverList<BrowserCompositorOutputSurfaceCapturer> capturer_list_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698