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

Side by Side Diff: content/public/browser/android/compositor.h

Issue 2731833002: content: Add public context creation API. (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "cc/resources/ui_resource_bitmap.h" 9 #include "cc/resources/ui_resource_bitmap.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "ui/android/resources/ui_resource_provider.h" 11 #include "ui/android/resources/ui_resource_provider.h"
12 #include "ui/gfx/geometry/rect.h" 12 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/size.h" 13 #include "ui/gfx/geometry/size.h"
14 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
15 15
16 namespace cc { 16 namespace cc {
17 class Layer; 17 class Layer;
18 } 18 }
19 19
20 namespace ui { 20 namespace ui {
21 class ResourceManager; 21 class ResourceManager;
22 class UIResourceProvider; 22 class UIResourceProvider;
23 } 23 }
24 24
25 namespace gpu {
26 class GpuChannelEstablishFactory;
27 }
28
25 namespace content { 29 namespace content {
26 class CompositorClient; 30 class CompositorClient;
27 31
28 // An interface to the browser-side compositor. 32 // An interface to the browser-side compositor.
29 class CONTENT_EXPORT Compositor { 33 class CONTENT_EXPORT Compositor {
30 public: 34 public:
31 virtual ~Compositor() {} 35 virtual ~Compositor() {}
32 36
33 // Performs the global initialization needed before any compositor 37 // Performs the global initialization needed before any compositor
34 // instance can be used. This should be called only once. 38 // instance can be used. This should be called only once.
35 static void Initialize(); 39 static void Initialize();
36 40
41 static gpu::GpuChannelEstablishFactory* GetGpuChannelFactory();
klausw 2017/03/05 01:49:54 Should this get a brief comment how it should or s
Khushal 2017/03/05 01:59:53 Added a comment. And I think its in general unders
42
37 // Creates and returns a compositor instance. |root_window| needs to outlive 43 // Creates and returns a compositor instance. |root_window| needs to outlive
38 // the compositor as it manages callbacks on the compositor. 44 // the compositor as it manages callbacks on the compositor.
39 static Compositor* Create(CompositorClient* client, 45 static Compositor* Create(CompositorClient* client,
40 gfx::NativeWindow root_window); 46 gfx::NativeWindow root_window);
41 47
42 // Attaches the layer tree. 48 // Attaches the layer tree.
43 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) = 0; 49 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) = 0;
44 50
45 // Set the output surface bounds. 51 // Set the output surface bounds.
46 virtual void SetWindowBounds(const gfx::Size& size) = 0; 52 virtual void SetWindowBounds(const gfx::Size& size) = 0;
(...skipping 14 matching lines...) Expand all
61 // Returns the resource manager associated with the compositor. 67 // Returns the resource manager associated with the compositor.
62 virtual ui::ResourceManager& GetResourceManager() = 0; 68 virtual ui::ResourceManager& GetResourceManager() = 0;
63 69
64 protected: 70 protected:
65 Compositor() {} 71 Compositor() {}
66 }; 72 };
67 73
68 } // namespace content 74 } // namespace content
69 75
70 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 76 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698