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

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

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 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 class SkBitmap; 16 class SkBitmap;
17 17
18 namespace cc { 18 namespace cc {
19 class Layer; 19 class Layer;
20 class LayerSettings;
20 } 21 }
21 22
22 namespace gfx { 23 namespace gfx {
23 class JavaBitmap; 24 class JavaBitmap;
24 } 25 }
25 26
26 namespace ui { 27 namespace ui {
27 class ResourceManager; 28 class ResourceManager;
28 class UIResourceProvider; 29 class UIResourceProvider;
29 } 30 }
30 31
31 namespace content { 32 namespace content {
32 class CompositorClient; 33 class CompositorClient;
33 34
34 // An interface to the browser-side compositor. 35 // An interface to the browser-side compositor.
35 class CONTENT_EXPORT Compositor { 36 class CONTENT_EXPORT Compositor {
36 public: 37 public:
37 virtual ~Compositor() {} 38 virtual ~Compositor() {}
38 39
39 // Performs the global initialization needed before any compositor 40 // Performs the global initialization needed before any compositor
40 // instance can be used. This should be called only once. 41 // instance can be used. This should be called only once.
41 static void Initialize(); 42 static void Initialize();
42 43
43 // Creates and returns a compositor instance. |root_window| needs to outlive 44 // Creates and returns a compositor instance. |root_window| needs to outlive
44 // the compositor as it manages callbacks on the compositor. 45 // the compositor as it manages callbacks on the compositor.
45 static Compositor* Create(CompositorClient* client, 46 static Compositor* Create(CompositorClient* client,
46 gfx::NativeWindow root_window); 47 gfx::NativeWindow root_window);
47 48
49 static const cc::LayerSettings& LayerSettings();
50 static void SetLayerSettings(const cc::LayerSettings& settings);
boliu 2015/05/18 15:39:31 I think nothing calls the setter? Remove it?
loyso (OOO) 2015/05/19 01:03:44 Yes. That was a question. We have --enable-ui-comp
loyso (OOO) 2015/05/20 02:48:53 Now we use switches::kEnableAndroidCompositorAnima
51
48 // Attaches the layer tree. 52 // Attaches the layer tree.
49 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) = 0; 53 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) = 0;
50 54
51 // Set the scale factor from DIP to pixel. 55 // Set the scale factor from DIP to pixel.
52 virtual void setDeviceScaleFactor(float factor) = 0; 56 virtual void setDeviceScaleFactor(float factor) = 0;
53 57
54 // Set the output surface bounds. 58 // Set the output surface bounds.
55 virtual void SetWindowBounds(const gfx::Size& size) = 0; 59 virtual void SetWindowBounds(const gfx::Size& size) = 0;
56 60
57 // Set the output surface which the compositor renders into. 61 // Set the output surface which the compositor renders into.
(...skipping 12 matching lines...) Expand all
70 // Returns the resource manager associated with the compositor. 74 // Returns the resource manager associated with the compositor.
71 virtual ui::ResourceManager& GetResourceManager() = 0; 75 virtual ui::ResourceManager& GetResourceManager() = 0;
72 76
73 protected: 77 protected:
74 Compositor() {} 78 Compositor() {}
75 }; 79 };
76 80
77 } // namespace content 81 } // namespace content
78 82
79 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 83 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698