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/surfaceless_gl_renderer.h" | 5 #include "ui/ozone/demo/surfaceless_gl_renderer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "ui/gl/gl_bindings.h" | 8 #include "ui/gl/gl_bindings.h" |
9 #include "ui/gl/gl_context.h" | 9 #include "ui/gl/gl_context.h" |
10 #include "ui/gl/gl_image.h" | 10 #include "ui/gl/gl_image.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 base::Bind(&SurfacelessGlRenderer::OnSwapBuffersAck, | 126 base::Bind(&SurfacelessGlRenderer::OnSwapBuffersAck, |
127 weak_ptr_factory_.GetWeakPtr()))) | 127 weak_ptr_factory_.GetWeakPtr()))) |
128 LOG(FATAL) << "Failed to swap buffers"; | 128 LOG(FATAL) << "Failed to swap buffers"; |
129 } | 129 } |
130 | 130 |
131 void SurfacelessGlRenderer::OnSwapBuffersAck() { | 131 void SurfacelessGlRenderer::OnSwapBuffersAck() { |
132 is_swapping_buffers_ = false; | 132 is_swapping_buffers_ = false; |
133 back_buffer_ ^= 1; | 133 back_buffer_ ^= 1; |
134 } | 134 } |
135 | 135 |
| 136 scoped_refptr<gfx::GLSurface> SurfacelessGlRenderer::CreateSurface() { |
| 137 return gfx::GLSurface::CreateSurfacelessViewGLSurface(widget_); |
| 138 } |
| 139 |
136 } // namespace ui | 140 } // namespace ui |
OLD | NEW |