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

Side by Side Diff: content/renderer/android/synchronous_compositor_factory.h

Issue 15851006: Move synchronous compositor into content/browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mkosiba comments1 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_
6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10
11 namespace base {
12 class MessageLoopProxy;
13 }
14
15 namespace cc {
16 class OutputSurface;
17 }
18
19 namespace content {
20
21 // Decouples creation from usage of the parts needed for the synchonous
22 // compositor rendering path. In practice this is only used in single
23 // process mode (namely, for Android WebView) hence the implementation of
24 // this will be injected from the logical 'browser' side code.
25 class SynchronousCompositorFactory {
26 public:
27 // Must only be called once, e.g. on startup. Ownership of |instance| remains
28 // with the caller.
29 static void SetInstance(SynchronousCompositorFactory* instance);
30 static SynchronousCompositorFactory* GetInstance();
31 static bool HasInstance() { return GetInstance() != NULL; }
jamesr 2013/05/30 20:28:57 nit: i don't find this terribly valuable, code cou
joth 2013/05/30 21:22:14 Done. In my mind I was thinking of something a lit
32
33 virtual scoped_refptr<base::MessageLoopProxy>
34 GetCompositorMessageLoop() = 0;
35 virtual scoped_ptr<cc::OutputSurface> CreateOutputSurface(
36 int routing_id) = 0;
37
38 protected:
39 SynchronousCompositorFactory() {}
40 ~SynchronousCompositorFactory() {}
41 };
42
43 }
44
45 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698