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

Unified Diff: cc/output/output_surface.h

Issue 15647021: Factor out cc::OutputSurface::InitializeAndSetContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « no previous file | cc/output/output_surface.cc » ('j') | cc/output/output_surface.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/output_surface.h
diff --git a/cc/output/output_surface.h b/cc/output/output_surface.h
index 00877de68c8f8baa72c8113f87982225b8be2fa2..fb93eb76dd2bb035b143ef4c4f6c0eb5ccbe7b47 100644
--- a/cc/output/output_surface.h
+++ b/cc/output/output_surface.h
@@ -6,8 +6,10 @@
#define CC_OUTPUT_OUTPUT_SURFACE_H_
#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "cc/base/cc_export.h"
+#include "cc/output/context_provider.h"
#include "cc/output/software_output_device.h"
#include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
@@ -106,17 +108,25 @@ class CC_EXPORT OutputSurface {
virtual void SetNeedsBeginFrame(bool enable) {}
protected:
+ // Synchronously initialize context3d and enter hardware mode.
+ // This can only supported in threaded compositing mode.
+ // |offscreen_context_provider| should match what is returned by
+ // LayerTreeClient::OffscreenContextProviderForCompositorThread.
+ bool InitializeAndSetContext3D(
+ scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
+ scoped_refptr<ContextProvider> offscreen_context_provider);
+
OutputSurfaceClient* client_;
struct cc::OutputSurface::Capabilities capabilities_;
+ scoped_ptr<OutputSurfaceCallbacks> callbacks_;
scoped_ptr<WebKit::WebGraphicsContext3D> context3d_;
scoped_ptr<cc::SoftwareOutputDevice> software_device_;
bool has_gl_discard_backbuffer_;
gfx::Size surface_size_;
float device_scale_factor_;
- scoped_ptr<OutputSurfaceCallbacks> callbacks_;
-
private:
+ void SetContext3D(scoped_ptr<WebKit::WebGraphicsContext3D> context3d);
DISALLOW_COPY_AND_ASSIGN(OutputSurface);
};
« no previous file with comments | « no previous file | cc/output/output_surface.cc » ('j') | cc/output/output_surface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698