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

Side by Side Diff: ui/ozone/demo/ozone_demo.cc

Issue 1091323002: Send a message through the ozone channel to recreate buffers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 } 147 }
148 void OnCloseRequest() override { Quit(); } 148 void OnCloseRequest() override { Quit(); }
149 void OnClosed() override {} 149 void OnClosed() override {}
150 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {} 150 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {}
151 void OnLostCapture() override {} 151 void OnLostCapture() override {}
152 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override { 152 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) override {
153 DCHECK_NE(widget, gfx::kNullAcceleratedWidget); 153 DCHECK_NE(widget, gfx::kNullAcceleratedWidget);
154 widget_ = widget; 154 widget_ = widget;
155 } 155 }
156 void OnActivationChanged(bool active) override {} 156 void OnActivationChanged(bool active) override {}
157 void OnChangedSurface() override {}
157 158
158 private: 159 private:
159 // Since we pretend to have a GPU process, we should also pretend to 160 // Since we pretend to have a GPU process, we should also pretend to
160 // initialize the GPU resources via a posted task. 161 // initialize the GPU resources via a posted task.
161 void StartOnGpu() { 162 void StartOnGpu() {
162 renderer_ = 163 renderer_ =
163 renderer_factory_->CreateRenderer(GetAcceleratedWidget(), GetSize()); 164 renderer_factory_->CreateRenderer(GetAcceleratedWidget(), GetSize());
164 if (renderer_->Initialize()) { 165 if (renderer_->Initialize()) {
165 timer_.Start(FROM_HERE, 166 timer_.Start(FROM_HERE,
166 base::TimeDelta::FromMilliseconds(kFrameDelayMilliseconds), 167 base::TimeDelta::FromMilliseconds(kFrameDelayMilliseconds),
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 ->SetCurrentLayoutByName("us"); 340 ->SetCurrentLayoutByName("us");
340 341
341 base::RunLoop run_loop; 342 base::RunLoop run_loop;
342 343
343 WindowManager window_manager(run_loop.QuitClosure()); 344 WindowManager window_manager(run_loop.QuitClosure());
344 345
345 run_loop.Run(); 346 run_loop.Run();
346 347
347 return 0; 348 return 0;
348 } 349 }
OLDNEW
« no previous file with comments | « ui/ozone/common/gpu/ozone_gpu_messages.h ('k') | ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698