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

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

Issue 2969153002: vr/gpu: BrowserGpuChannelHostFactory should be called on the same thread. (Closed)
Patch Set: comment Created 3 years, 5 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
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 27 matching lines...) Expand all
38 // An interface to the browser-side compositor. 38 // An interface to the browser-side compositor.
39 class CONTENT_EXPORT Compositor { 39 class CONTENT_EXPORT Compositor {
40 public: 40 public:
41 virtual ~Compositor() {} 41 virtual ~Compositor() {}
42 42
43 // Performs the global initialization needed before any compositor 43 // Performs the global initialization needed before any compositor
44 // instance can be used. This should be called only once. 44 // instance can be used. This should be called only once.
45 static void Initialize(); 45 static void Initialize();
46 46
47 // Creates a GL context for the provided |handle|. If a null handle is passed, 47 // Creates a GL context for the provided |handle|. If a null handle is passed,
48 // an offscreen context is created. 48 // an offscreen context is created. This must be called on the UI thread.
49 using ContextProviderCallback = 49 using ContextProviderCallback =
50 base::Callback<void(scoped_refptr<cc::ContextProvider>)>; 50 base::Callback<void(scoped_refptr<cc::ContextProvider>)>;
51 static void CreateContextProvider( 51 static void CreateContextProvider(
52 gpu::SurfaceHandle handle, 52 gpu::SurfaceHandle handle,
53 gpu::gles2::ContextCreationAttribHelper attributes, 53 gpu::gles2::ContextCreationAttribHelper attributes,
54 gpu::SharedMemoryLimits shared_memory_limits, 54 gpu::SharedMemoryLimits shared_memory_limits,
55 ContextProviderCallback callback); 55 ContextProviderCallback callback);
56 56
57 // Creates and returns a compositor instance. |root_window| needs to outlive 57 // Creates and returns a compositor instance. |root_window| needs to outlive
58 // the compositor as it manages callbacks on the compositor. 58 // the compositor as it manages callbacks on the compositor.
(...skipping 22 matching lines...) Expand all
81 // Returns the resource manager associated with the compositor. 81 // Returns the resource manager associated with the compositor.
82 virtual ui::ResourceManager& GetResourceManager() = 0; 82 virtual ui::ResourceManager& GetResourceManager() = 0;
83 83
84 protected: 84 protected:
85 Compositor() {} 85 Compositor() {}
86 }; 86 };
87 87
88 } // namespace content 88 } // namespace content
89 89
90 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_ 90 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_COMPOSITOR_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698