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

Side by Side Diff: services/ui/public/cpp/gpu_service.h

Issue 2448983003: gpu: Refactor memory buffer handling code out of content.
Patch Set: . Created 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_ 5 #ifndef SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_
6 #define SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_ 6 #define SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 void EstablishGpuChannel( 45 void EstablishGpuChannel(
46 const gpu::GpuChannelEstablishedCallback& callback) override; 46 const gpu::GpuChannelEstablishedCallback& callback) override;
47 scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override; 47 scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override;
48 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; 48 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
49 49
50 private: 50 private:
51 friend struct base::DefaultSingletonTraits<GpuService>; 51 friend struct base::DefaultSingletonTraits<GpuService>;
52 52
53 GpuService(service_manager::Connector* connector, 53 GpuService(service_manager::Connector* connector,
54 scoped_refptr<base::SingleThreadTaskRunner> task_runner); 54 scoped_refptr<base::SingleThreadTaskRunner> task_runner);
55 void SetUpConnection();
55 56
56 scoped_refptr<gpu::GpuChannelHost> GetGpuChannel(); 57 scoped_refptr<gpu::GpuChannelHost> GetGpuChannel();
57 void EstablishGpuChannelOnMainThreadSyncLocked(); 58 void EstablishGpuChannelOnMainThreadSyncLocked();
58 void OnEstablishedGpuChannel(int client_id, 59 void OnEstablishedGpuChannel(int client_id,
59 mojo::ScopedMessagePipeHandle channel_handle, 60 mojo::ScopedMessagePipeHandle channel_handle,
60 const gpu::GPUInfo& gpu_info); 61 const gpu::GPUInfo& gpu_info);
61 62
62 // gpu::GpuChannelHostFactory overrides: 63 // gpu::GpuChannelHostFactory overrides:
63 bool IsMainThread() override; 64 bool IsMainThread() override;
64 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; 65 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
(...skipping 10 matching lines...) Expand all
75 ui::mojom::GpuServicePtr gpu_service_; 76 ui::mojom::GpuServicePtr gpu_service_;
76 scoped_refptr<gpu::GpuChannelHost> gpu_channel_; 77 scoped_refptr<gpu::GpuChannelHost> gpu_channel_;
77 std::vector<gpu::GpuChannelEstablishedCallback> establish_callbacks_; 78 std::vector<gpu::GpuChannelEstablishedCallback> establish_callbacks_;
78 79
79 DISALLOW_COPY_AND_ASSIGN(GpuService); 80 DISALLOW_COPY_AND_ASSIGN(GpuService);
80 }; 81 };
81 82
82 } // namespace ui 83 } // namespace ui
83 84
84 #endif // SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_ 85 #endif // SERVICES_UI_PUBLIC_CPP_GPU_SERVICE_H_
OLDNEW
« no previous file with comments | « mojo/public/cpp/bindings/sync_call_restrictions.h ('k') | services/ui/public/cpp/gpu_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698