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

Unified Diff: ui/gl/gpu_switching_manager.cc

Issue 681713002: Update from chromium https://crrev.com/301315 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gpu_switching_manager.h ('k') | ui/gl/gpu_switching_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gpu_switching_manager.cc
diff --git a/ui/gl/gpu_switching_manager.cc b/ui/gl/gpu_switching_manager.cc
index 05a7865c6bf03d382841ae41a242d675efa2bfea..f9046291d3a8dbae46a5edb6a92e58d858528d38 100644
--- a/ui/gl/gpu_switching_manager.cc
+++ b/ui/gl/gpu_switching_manager.cc
@@ -102,6 +102,18 @@ void GpuSwitchingManager::SetGpuCount(size_t gpu_count) {
gpu_count_ = gpu_count;
}
+void GpuSwitchingManager::AddObserver(GpuSwitchingObserver* observer) {
+ observer_list_.AddObserver(observer);
+}
+
+void GpuSwitchingManager::RemoveObserver(GpuSwitchingObserver* observer) {
+ observer_list_.RemoveObserver(observer);
+}
+
+void GpuSwitchingManager::NotifyGpuSwitched() {
+ FOR_EACH_OBSERVER(GpuSwitchingObserver, observer_list_, OnGpuSwitched());
+}
+
gfx::GpuPreference GpuSwitchingManager::AdjustGpuPreference(
gfx::GpuPreference gpu_preference) {
if (!gpu_switching_option_set_)
« no previous file with comments | « ui/gl/gpu_switching_manager.h ('k') | ui/gl/gpu_switching_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698