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

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

Issue 975733004: [Ozone-Demo] Update Surfaceless renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_gn
Patch Set: Created 5 years, 9 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
« no previous file with comments | « ui/ozone/demo/surfaceless_gl_renderer.h ('k') | no next file » | 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 #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
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
OLDNEW
« no previous file with comments | « ui/ozone/demo/surfaceless_gl_renderer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698