| 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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "ui/gfx/geometry/size.h" | 7 #include "ui/gfx/geometry/size.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_surface.h" | 10 #include "ui/gl/gl_surface.h" |
| 11 #include "ui/ozone/ozone_platform.h" | 11 #include "ui/ozone/public/ozone_platform.h" |
| 12 #include "ui/ozone/public/surface_factory_ozone.h" | 12 #include "ui/ozone/public/surface_factory_ozone.h" |
| 13 | 13 |
| 14 int main(int argc, char** argv) { | 14 int main(int argc, char** argv) { |
| 15 CommandLine::Init(argc, argv); | 15 CommandLine::Init(argc, argv); |
| 16 base::AtExitManager exit_manager; | 16 base::AtExitManager exit_manager; |
| 17 | 17 |
| 18 ui::OzonePlatform::InitializeForUI(); | 18 ui::OzonePlatform::InitializeForUI(); |
| 19 if (!gfx::GLSurface::InitializeOneOff()) | 19 if (!gfx::GLSurface::InitializeOneOff()) |
| 20 LOG(FATAL) << "Failed to initialize GL"; | 20 LOG(FATAL) << "Failed to initialize GL"; |
| 21 | 21 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 43 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); | 43 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); |
| 44 float fraction = static_cast<float>(i) / iterations; | 44 float fraction = static_cast<float>(i) / iterations; |
| 45 glClearColor(1 - fraction, fraction, 0.0, 1.0); | 45 glClearColor(1 - fraction, fraction, 0.0, 1.0); |
| 46 | 46 |
| 47 if (!surface->SwapBuffers()) | 47 if (!surface->SwapBuffers()) |
| 48 LOG(FATAL) << "Failed to swap buffers"; | 48 LOG(FATAL) << "Failed to swap buffers"; |
| 49 } | 49 } |
| 50 | 50 |
| 51 return 0; | 51 return 0; |
| 52 } | 52 } |
| OLD | NEW |