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

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

Issue 731133002: Upstream ResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply David's comments Created 6 years, 1 month 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 "content/public/browser/android/resource_manager.h"
11 #include "content/public/browser/android/ui_resource_provider.h" 12 #include "content/public/browser/android/ui_resource_provider.h"
12 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
13 #include "ui/gfx/rect.h" 14 #include "ui/gfx/rect.h"
14 #include "ui/gfx/size.h" 15 #include "ui/gfx/size.h"
15 16
16 class SkBitmap; 17 class SkBitmap;
17 18
18 namespace cc { 19 namespace cc {
19 class Layer; 20 class Layer;
20 } 21 }
21 22
22 namespace gfx { 23 namespace gfx {
23 class JavaBitmap; 24 class JavaBitmap;
24 } 25 }
25 26
26 namespace content { 27 namespace content {
27 class CompositorClient; 28 class CompositorClient;
29 class ResourceManager;
28 class UIResourceProvider; 30 class UIResourceProvider;
29 31
30 // An interface to the browser-side compositor. 32 // An interface to the browser-side compositor.
31 class CONTENT_EXPORT Compositor { 33 class CONTENT_EXPORT Compositor {
32 public: 34 public:
33 virtual ~Compositor() {} 35 virtual ~Compositor() {}
34 36
35 // Performs the global initialization needed before any compositor 37 // Performs the global initialization needed before any compositor
36 // instance can be used. This should be called only once. 38 // instance can be used. This should be called only once.
37 static void Initialize(); 39 static void Initialize();
(...skipping 23 matching lines...) Expand all
61 // Tells the view tree to assume a transparent background when rendering. 63 // Tells the view tree to assume a transparent background when rendering.
62 virtual void SetHasTransparentBackground(bool flag) = 0; 64 virtual void SetHasTransparentBackground(bool flag) = 0;
63 65
64 // Request layout and draw. You only need to call this if you need to trigger 66 // Request layout and draw. You only need to call this if you need to trigger
65 // Composite *without* having modified the layer tree. 67 // Composite *without* having modified the layer tree.
66 virtual void SetNeedsComposite() = 0; 68 virtual void SetNeedsComposite() = 0;
67 69
68 // Returns the UI resource provider associated with the compositor. 70 // Returns the UI resource provider associated with the compositor.
69 virtual UIResourceProvider& GetUIResourceProvider() = 0; 71 virtual UIResourceProvider& GetUIResourceProvider() = 0;
70 72
73 // Returns the resource manager associated with the compositor.
74 virtual ResourceManager* GetResourceManager() = 0;
jdduke (slow) 2014/11/19 00:09:15 dtrainor@: So eventually we'll call this, and get
75
71 protected: 76 protected:
72 Compositor() {} 77 Compositor() {}
73 }; 78 };
74 79
75 } // namespace content 80 } // namespace content
76 81
77 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 82 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698