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

Side by Side Diff: ui/ozone/platform/dri/dri_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: changes suggested by dcheng 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
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | ui/ozone/platform/dri/dri_gpu_platform_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PLATFORM_DRI_DRI_GPU_PLATFORM_SUPPORT_H_ 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_GPU_PLATFORM_SUPPORT_H_
6 #define UI_OZONE_PLATFORM_DRI_DRI_GPU_PLATFORM_SUPPORT_H_ 6 #define UI_OZONE_PLATFORM_DRI_DRI_GPU_PLATFORM_SUPPORT_H_
7 7
8 #include "base/containers/scoped_ptr_hash_map.h" 8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 23 matching lines...) Expand all
34 DriGpuPlatformSupport(DriSurfaceFactory* dri, 34 DriGpuPlatformSupport(DriSurfaceFactory* dri,
35 DriWindowDelegateManager* window_manager, 35 DriWindowDelegateManager* window_manager,
36 ScreenManager* screen_manager, 36 ScreenManager* screen_manager,
37 scoped_ptr<NativeDisplayDelegateDri> ndd); 37 scoped_ptr<NativeDisplayDelegateDri> ndd);
38 ~DriGpuPlatformSupport() override; 38 ~DriGpuPlatformSupport() override;
39 39
40 void AddHandler(scoped_ptr<GpuPlatformSupport> handler); 40 void AddHandler(scoped_ptr<GpuPlatformSupport> handler);
41 41
42 // GpuPlatformSupport: 42 // GpuPlatformSupport:
43 void OnChannelEstablished(IPC::Sender* sender) override; 43 void OnChannelEstablished(IPC::Sender* sender) override;
44 void RelinquishGpuResources(const base::Closure& callback) override;
44 45
45 // IPC::Listener: 46 // IPC::Listener:
46 bool OnMessageReceived(const IPC::Message& message) override; 47 bool OnMessageReceived(const IPC::Message& message) override;
47 48
48 private: 49 private:
49 void OnCreateWindowDelegate(gfx::AcceleratedWidget widget); 50 void OnCreateWindowDelegate(gfx::AcceleratedWidget widget);
50 void OnDestroyWindowDelegate(gfx::AcceleratedWidget widget); 51 void OnDestroyWindowDelegate(gfx::AcceleratedWidget widget);
51 void OnWindowBoundsChanged(gfx::AcceleratedWidget widget, 52 void OnWindowBoundsChanged(gfx::AcceleratedWidget widget,
52 const gfx::Rect& bounds); 53 const gfx::Rect& bounds);
53 void OnCursorSet(gfx::AcceleratedWidget widget, 54 void OnCursorSet(gfx::AcceleratedWidget widget,
(...skipping 18 matching lines...) Expand all
72 DriWindowDelegateManager* window_manager_; // Not owned. 73 DriWindowDelegateManager* window_manager_; // Not owned.
73 ScreenManager* screen_manager_; // Not owned. 74 ScreenManager* screen_manager_; // Not owned.
74 75
75 scoped_ptr<NativeDisplayDelegateDri> ndd_; 76 scoped_ptr<NativeDisplayDelegateDri> ndd_;
76 ScopedVector<GpuPlatformSupport> handlers_; 77 ScopedVector<GpuPlatformSupport> handlers_;
77 }; 78 };
78 79
79 } // namespace ui 80 } // namespace ui
80 81
81 #endif // UI_OZONE_PLATFORM_DRI_DRI_GPU_PLATFORM_SUPPORT_H_ 82 #endif // UI_OZONE_PLATFORM_DRI_DRI_GPU_PLATFORM_SUPPORT_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | ui/ozone/platform/dri/dri_gpu_platform_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698