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

Side by Side Diff: cc/output/context_provider.h

Issue 312803002: Android media: VideoFrame should not store so many sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android unittests build fix Created 6 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 CC_OUTPUT_CONTEXT_PROVIDER_H_ 5 #ifndef CC_OUTPUT_CONTEXT_PROVIDER_H_
6 #define CC_OUTPUT_CONTEXT_PROVIDER_H_ 6 #define CC_OUTPUT_CONTEXT_PROVIDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/weak_ptr.h"
10 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
11 #include "gpu/command_buffer/common/capabilities.h" 12 #include "gpu/command_buffer/common/capabilities.h"
12 13
13 class GrContext; 14 class GrContext;
14 15
15 namespace gpu { 16 namespace gpu {
16 class ContextSupport; 17 class ContextSupport;
17 namespace gles2 { class GLES2Interface; } 18 namespace gles2 { class GLES2Interface; }
18 } 19 }
19 20
20 namespace cc { 21 namespace cc {
21 struct ManagedMemoryPolicy; 22 struct ManagedMemoryPolicy;
22 23
23 class ContextProvider : public base::RefCountedThreadSafe<ContextProvider> { 24 class ContextProvider : public base::RefCountedThreadSafe<ContextProvider>,
25 public base::SupportsWeakPtr<ContextProvider> {
danakj 2014/07/10 17:09:15 ಠ_ಠ let's not do this please
24 public: 26 public:
25 // Bind the 3d context to the current thread. This should be called before 27 // Bind the 3d context to the current thread. This should be called before
26 // accessing the contexts. Calling it more than once should have no effect. 28 // accessing the contexts. Calling it more than once should have no effect.
27 // Once this function has been called, the class should only be accessed 29 // Once this function has been called, the class should only be accessed
28 // from the same thread. 30 // from the same thread.
29 virtual bool BindToCurrentThread() = 0; 31 virtual bool BindToCurrentThread() = 0;
30 32
31 virtual gpu::gles2::GLES2Interface* ContextGL() = 0; 33 virtual gpu::gles2::GLES2Interface* ContextGL() = 0;
32 virtual gpu::ContextSupport* ContextSupport() = 0; 34 virtual gpu::ContextSupport* ContextSupport() = 0;
33 virtual class GrContext* GrContext() = 0; 35 virtual class GrContext* GrContext() = 0;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0; 75 const MemoryPolicyChangedCallback& memory_policy_changed_callback) = 0;
74 76
75 protected: 77 protected:
76 friend class base::RefCountedThreadSafe<ContextProvider>; 78 friend class base::RefCountedThreadSafe<ContextProvider>;
77 virtual ~ContextProvider() {} 79 virtual ~ContextProvider() {}
78 }; 80 };
79 81
80 } // namespace cc 82 } // namespace cc
81 83
82 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_ 84 #endif // CC_OUTPUT_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/resources/video_resource_updater.cc » ('j') | cc/resources/video_resource_updater.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698