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

Side by Side Diff: components/mus/public/cpp/context_provider.h

Issue 1976703003: Impl mus::mojom::GpuService to enable using Chrome IPC version gpu CmdBuf in mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "cc/output/context_provider.h" 13 #include "cc/output/context_provider.h"
14 #include "components/mus/public/cpp/mus_public_export.h"
14 #include "mojo/public/cpp/system/core.h" 15 #include "mojo/public/cpp/system/core.h"
15 16
16 namespace mus { 17 namespace mus {
17 18
18 class GLES2Context; 19 class GLES2Context;
19 20
20 class ContextProvider : public cc::ContextProvider { 21 class MUS_PUBLIC_EXPORT ContextProvider : public cc::ContextProvider {
Fady Samuel 2016/05/25 17:06:47 Why did you make this a component?
Peng 2016/05/25 19:42:55 Becatse GpuServiceMus has a global variable g_gpu_
21 public: 22 public:
22 explicit ContextProvider(mojo::ScopedMessagePipeHandle command_buffer_handle); 23 explicit ContextProvider(mojo::ScopedMessagePipeHandle command_buffer_handle);
23 24
24 // cc::ContextProvider implementation. 25 // cc::ContextProvider implementation.
25 bool BindToCurrentThread() override; 26 bool BindToCurrentThread() override;
26 gpu::gles2::GLES2Interface* ContextGL() override; 27 gpu::gles2::GLES2Interface* ContextGL() override;
27 gpu::ContextSupport* ContextSupport() override; 28 gpu::ContextSupport* ContextSupport() override;
28 class GrContext* GrContext() override; 29 class GrContext* GrContext() override;
29 void InvalidateGrContext(uint32_t state) override; 30 void InvalidateGrContext(uint32_t state) override;
30 base::Lock* GetLock() override; 31 base::Lock* GetLock() override;
(...skipping 14 matching lines...) Expand all
45 46
46 mojo::ScopedMessagePipeHandle command_buffer_handle_; 47 mojo::ScopedMessagePipeHandle command_buffer_handle_;
47 std::unique_ptr<GLES2Context> context_; 48 std::unique_ptr<GLES2Context> context_;
48 49
49 DISALLOW_COPY_AND_ASSIGN(ContextProvider); 50 DISALLOW_COPY_AND_ASSIGN(ContextProvider);
50 }; 51 };
51 52
52 } // namespace mus 53 } // namespace mus
53 54
54 #endif // COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_ 55 #endif // COMPONENTS_MUS_PUBLIC_CPP_CONTEXT_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698