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

Side by Side Diff: ui/ozone/public/gpu_platform_support.h

Issue 712343003: Infrastructure for temportarily relinquishing GPU resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try trybots again. Maybe now I have access 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 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 UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_ 5 #ifndef UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_
6 #define UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_ 6 #define UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_
7 7
8 #include "base/callback.h"
8 #include "ipc/ipc_listener.h" 9 #include "ipc/ipc_listener.h"
9 #include "ipc/ipc_sender.h" 10 #include "ipc/ipc_sender.h"
10 #include "ui/ozone/ozone_base_export.h" 11 #include "ui/ozone/ozone_base_export.h"
11 12
12 namespace ui { 13 namespace ui {
13 14
14 // Platform-specific object to support a GPU process. 15 // Platform-specific object to support a GPU process.
15 // 16 //
16 // See GpuPlatformSupportHost for more context. 17 // See GpuPlatformSupportHost for more context.
17 class OZONE_BASE_EXPORT GpuPlatformSupport : public IPC::Listener { 18 class OZONE_BASE_EXPORT GpuPlatformSupport : public IPC::Listener {
18 public: 19 public:
19 GpuPlatformSupport(); 20 GpuPlatformSupport();
20 ~GpuPlatformSupport() override; 21 ~GpuPlatformSupport() override;
21 22
22 // Called when the GPU process is spun up & channel established. 23 // Called when the GPU process is spun up & channel established.
23 virtual void OnChannelEstablished(IPC::Sender* sender) = 0; 24 virtual void OnChannelEstablished(IPC::Sender* sender) = 0;
25
26 virtual void RelinquishGpuResources(const base::Closure& callback) = 0;
24 }; 27 };
25 28
26 // Create a stub implementation. 29 // Create a stub implementation.
27 OZONE_BASE_EXPORT GpuPlatformSupport* CreateStubGpuPlatformSupport(); 30 OZONE_BASE_EXPORT GpuPlatformSupport* CreateStubGpuPlatformSupport();
28 31
29 } // namespace ui 32 } // namespace ui
30 33
31 #endif // UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_ 34 #endif // UI_OZONE_PUBLIC_GPU_PLATFORM_SUPPORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698