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

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

Issue 1123763003: Draw the offscreen texture to reflector's surface without extra copy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved texture code to ReflectorTexture Created 5 years, 7 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/offscreen_browser_compositor_output_surface.h
diff --git a/content/browser/compositor/offscreen_browser_compositor_output_surface.h b/content/browser/compositor/offscreen_browser_compositor_output_surface.h
index e9fbe6d7c5fde873855bfa5a77a9e702b9fb99cf..67fc2247c7e5832575c3a3735c7d24dcae77ad6b 100644
--- a/content/browser/compositor/offscreen_browser_compositor_output_surface.h
+++ b/content/browser/compositor/offscreen_browser_compositor_output_surface.h
@@ -6,6 +6,7 @@
#define CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
#include "base/cancelable_callback.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/compositor/browser_compositor_output_surface.h"
@@ -15,6 +16,7 @@ class CompositorVSyncManager;
namespace content {
class CommandBufferProxyImpl;
+class ReflectorTexture;
class OffscreenBrowserCompositorOutputSurface
: public BrowserCompositorOutputSurface {
@@ -35,6 +37,9 @@ class OffscreenBrowserCompositorOutputSurface
void BindFramebuffer() override;
void SwapBuffers(cc::CompositorFrame* frame) override;
+ // BrowserCompositorOutputSurface
+ void OnReflectorChanged() override;
+ base::Closure CreateCompositionStartedCallback() override;
#if defined(OS_MACOSX)
void OnSurfaceDisplayed() override {};
void SetSurfaceSuspendedForRecycle(bool suspended) override {};
@@ -43,7 +48,7 @@ class OffscreenBrowserCompositorOutputSurface
uint32 fbo_;
bool is_backbuffer_discarded_;
- uint32 backing_texture_id_;
+ scoped_ptr<ReflectorTexture> reflector_texture_;
base::WeakPtrFactory<OffscreenBrowserCompositorOutputSurface>
weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698