OLD | NEW |
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 "ui/ozone/demo/gl_renderer.h" | 5 #include "ui/ozone/demo/gl_renderer.h" |
6 | 6 |
7 #include "base/location.h" | 7 #include "base/location.h" |
8 #include "base/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "ui/gl/gl_bindings.h" | 10 #include "ui/gl/gl_bindings.h" |
11 #include "ui/gl/gl_context.h" | 11 #include "ui/gl/gl_context.h" |
12 #include "ui/gl/gl_surface.h" | 12 #include "ui/gl/gl_surface.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 GlRenderer::GlRenderer(gfx::AcceleratedWidget widget, | 16 GlRenderer::GlRenderer(gfx::AcceleratedWidget widget, |
17 const scoped_refptr<gfx::GLSurface>& surface, | 17 const scoped_refptr<gfx::GLSurface>& surface, |
18 const gfx::Size& size) | 18 const gfx::Size& size) |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 weak_ptr_factory_.GetWeakPtr())); | 55 weak_ptr_factory_.GetWeakPtr())); |
56 } | 56 } |
57 | 57 |
58 void GlRenderer::PostRenderFrameTask(gfx::SwapResult result) { | 58 void GlRenderer::PostRenderFrameTask(gfx::SwapResult result) { |
59 base::ThreadTaskRunnerHandle::Get()->PostTask( | 59 base::ThreadTaskRunnerHandle::Get()->PostTask( |
60 FROM_HERE, | 60 FROM_HERE, |
61 base::Bind(&GlRenderer::RenderFrame, weak_ptr_factory_.GetWeakPtr())); | 61 base::Bind(&GlRenderer::RenderFrame, weak_ptr_factory_.GetWeakPtr())); |
62 } | 62 } |
63 | 63 |
64 } // namespace ui | 64 } // namespace ui |
OLD | NEW |