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

Unified Diff: content/browser/compositor/offscreen_browser_compositor_output_surface.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/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
new file mode 100644
index 0000000000000000000000000000000000000000..d98805e46d90d73ba38e89291fb676fce1599815
--- /dev/null
+++ b/content/browser/compositor/offscreen_browser_compositor_output_surface.h
@@ -0,0 +1,51 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
+#define CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_
+
+#include "base/cancelable_callback.h"
+#include "base/memory/weak_ptr.h"
+#include "content/browser/compositor/browser_compositor_output_surface.h"
+
+namespace ui {
+class CompositorVSyncManager;
+}
+
+namespace content {
+class CommandBufferProxyImpl;
+
+class OffscreenBrowserCompositorOutputSurface
+ : public BrowserCompositorOutputSurface {
+ public:
+ OffscreenBrowserCompositorOutputSurface(
+ const scoped_refptr<ContextProviderCommandBuffer>& context,
+ const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager,
+ scoped_ptr<BrowserCompositorOverlayCandidateValidator>
+ overlay_candidate_validator);
+
+ ~OffscreenBrowserCompositorOutputSurface() override;
+
+ protected:
+ // cc::OutputSurface:
+ void EnsureBackbuffer() override;
+ void DiscardBackbuffer() override;
+ void Reshape(const gfx::Size& size, float scale_factor) override;
+ void BindFramebuffer() override;
+ void SwapBuffers(cc::CompositorFrame* frame) override;
+
+ uint32 fbo_;
+ bool is_backbuffer_discarded_;
+ uint32 backing_texture_id_;
+
+ base::WeakPtrFactory<OffscreenBrowserCompositorOutputSurface>
+ weak_ptr_factory_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(OffscreenBrowserCompositorOutputSurface);
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_COMPOSITOR_OFFSCREEN_BROWSER_COMPOSITOR_OUTPUT_SURFACE_H_

Powered by Google App Engine
This is Rietveld 408576698