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

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

Issue 888653002: Revert of Revert "compositor: Fix texture flipping for SW mirroring with surfaceless" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 4d0da018ded46f53fc425457986b943de4db0669..2e3b1b80fb0cd7db5d23cdec34af4b9152248bc4 100644
--- a/content/browser/compositor/reflector_impl.h
+++ b/content/browser/compositor/reflector_impl.h
@@ -10,6 +10,7 @@
#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
#include "content/browser/compositor/image_transport_factory.h"
+#include "content/common/content_export.h"
#include "gpu/command_buffer/common/mailbox_holder.h"
#include "ui/compositor/reflector.h"
#include "ui/gfx/geometry/size.h"
@@ -30,8 +31,9 @@
// A reflector implementation that copies the framebuffer content
// to the texture, then draw it onto the mirroring compositor.
-class ReflectorImpl : public base::SupportsWeakPtr<ReflectorImpl>,
- public ui::Reflector {
+class CONTENT_EXPORT ReflectorImpl
+ : public base::SupportsWeakPtr<ReflectorImpl>,
+ public ui::Reflector {
public:
ReflectorImpl(
ui::Compositor* mirrored_compositor,
@@ -78,6 +80,8 @@
void DetachFromOutputSurface();
private:
+ friend class ReflectorImplTest;
+
struct MainThreadData {
MainThreadData(ui::Compositor* mirrored_compositor,
ui::Layer* mirroring_layer);
@@ -86,6 +90,7 @@
bool needs_set_mailbox;
ui::Compositor* mirrored_compositor;
ui::Layer* mirroring_layer;
+ bool flip_texture;
};
struct ImplThreadData {
@@ -110,11 +115,12 @@
// Request full redraw on mirroring compositor.
void FullRedrawOnMainThread(gfx::Size size);
- void UpdateSubBufferOnMainThread(gfx::Size size, gfx::Rect rect);
+ void UpdateSubBufferOnMainThread(const gfx::Size& size,
+ const gfx::Rect& rect);
// Request full redraw on mirrored compositor so that
// the full content will be copied to mirroring compositor.
- void FullRedrawContentOnMainThread();
+ void FullRedrawContentOnMainThread(bool flip_texture);
// This exists just to hold a reference to a ReflectorImpl in a post task,
// so the ReflectorImpl gets deleted when the function returns.
« no previous file with comments | « content/browser/compositor/browser_compositor_output_surface.cc ('k') | content/browser/compositor/reflector_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698