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

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

Issue 1108713004: OffscreenBrowserCompositorOutputSurface for Unified Desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/reflector_impl.h
diff --git a/content/browser/compositor/reflector_impl.h b/content/browser/compositor/reflector_impl.h
index 38a3387585acd1a8e0bc8d57c97711a0ffe76c1c..7f3b9fc4fe5ef3b63593e8dc6845f3447325114e 100644
--- a/content/browser/compositor/reflector_impl.h
+++ b/content/browser/compositor/reflector_impl.h
@@ -7,6 +7,7 @@
#include "base/id_map.h"
#include "base/memory/scoped_ptr.h"
+#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
#include "content/browser/compositor/image_transport_factory.h"
@@ -47,6 +48,8 @@ class CONTENT_EXPORT ReflectorImpl
// ui::Reflector implementation.
void OnMirroringCompositorResized() override;
+ void AddMirroringLayer(ui::Layer* layer) override;
+ void RemoveMirroringLayer(ui::Layer* layer) override;
// Called in |BrowserCompositorOutputSurface::SwapBuffers| to copy
// the full screen image to the |mailbox_| texture.
@@ -60,14 +63,19 @@ class CONTENT_EXPORT ReflectorImpl
void OnSourceSurfaceReady(BrowserCompositorOutputSurface* surface);
private:
- void UpdateTexture(const gfx::Size& size, const gfx::Rect& redraw_rect);
+ struct LayerData;
+
+ ScopedVector<ReflectorImpl::LayerData>::iterator FindLayerData(
+ ui::Layer* layer);
+ void UpdateTexture(LayerData* layer_data,
+ const gfx::Size& size,
+ const gfx::Rect& redraw_rect);
ui::Compositor* mirrored_compositor_;
- ui::Layer* mirroring_layer_;
+ ScopedVector<LayerData> mirroring_layers_;
scoped_refptr<OwnedMailbox> mailbox_;
scoped_ptr<GLHelper> mirrored_compositor_gl_helper_;
int mirrored_compositor_gl_helper_texture_id_;
- bool needs_set_mailbox_;
bool flip_texture_;
BrowserCompositorOutputSurface* output_surface_;
};

Powered by Google App Engine
This is Rietveld 408576698