| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/gl/gl_surface.h" | 5 #include "ui/gl/gl_surface.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 InitializeDebugGLBindings(); | 89 InitializeDebugGLBindings(); |
| 90 if (disable_gl_drawing) | 90 if (disable_gl_drawing) |
| 91 InitializeNullDrawGLBindings(); | 91 InitializeNullDrawGLBindings(); |
| 92 } | 92 } |
| 93 return initialized; | 93 return initialized; |
| 94 } | 94 } |
| 95 | 95 |
| 96 GLSurface::GLSurface() {} | 96 GLSurface::GLSurface() {} |
| 97 | 97 |
| 98 bool GLSurface::Initialize() { | 98 bool GLSurface::Initialize() { |
| 99 return Initialize(SURFACE_DEFAULT); | 99 return Initialize(GetDefaultFormat()); |
| 100 } | 100 } |
| 101 | 101 |
| 102 bool GLSurface::Initialize(GLSurface::Format format) { | 102 bool GLSurface::Initialize(GLSurface::Format format) { |
| 103 format_ = format; |
| 103 return true; | 104 return true; |
| 104 } | 105 } |
| 105 | 106 |
| 106 bool GLSurface::Resize(const gfx::Size& size, | 107 bool GLSurface::Resize(const gfx::Size& size, |
| 107 float scale_factor, | 108 float scale_factor, |
| 108 bool has_alpha) { | 109 bool has_alpha) { |
| 109 NOTIMPLEMENTED(); | 110 NOTIMPLEMENTED(); |
| 110 return false; | 111 return false; |
| 111 } | 112 } |
| 112 | 113 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 void* GLSurface::GetDisplay() { | 184 void* GLSurface::GetDisplay() { |
| 184 NOTIMPLEMENTED(); | 185 NOTIMPLEMENTED(); |
| 185 return NULL; | 186 return NULL; |
| 186 } | 187 } |
| 187 | 188 |
| 188 void* GLSurface::GetConfig() { | 189 void* GLSurface::GetConfig() { |
| 189 NOTIMPLEMENTED(); | 190 NOTIMPLEMENTED(); |
| 190 return NULL; | 191 return NULL; |
| 191 } | 192 } |
| 192 | 193 |
| 193 unsigned GLSurface::GetFormat() { | 194 GLSurface::Format GLSurface::GetFormat() { |
| 194 NOTIMPLEMENTED(); | 195 return format_; |
| 195 return 0; | |
| 196 } | 196 } |
| 197 | 197 |
| 198 VSyncProvider* GLSurface::GetVSyncProvider() { | 198 VSyncProvider* GLSurface::GetVSyncProvider() { |
| 199 return NULL; | 199 return NULL; |
| 200 } | 200 } |
| 201 | 201 |
| 202 bool GLSurface::ScheduleOverlayPlane(int z_order, | 202 bool GLSurface::ScheduleOverlayPlane(int z_order, |
| 203 OverlayTransform transform, | 203 OverlayTransform transform, |
| 204 gl::GLImage* image, | 204 gl::GLImage* image, |
| 205 const Rect& bounds_rect, | 205 const Rect& bounds_rect, |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 } | 366 } |
| 367 | 367 |
| 368 void* GLSurfaceAdapter::GetDisplay() { | 368 void* GLSurfaceAdapter::GetDisplay() { |
| 369 return surface_->GetDisplay(); | 369 return surface_->GetDisplay(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 void* GLSurfaceAdapter::GetConfig() { | 372 void* GLSurfaceAdapter::GetConfig() { |
| 373 return surface_->GetConfig(); | 373 return surface_->GetConfig(); |
| 374 } | 374 } |
| 375 | 375 |
| 376 unsigned GLSurfaceAdapter::GetFormat() { | 376 GLSurface::Format GLSurfaceAdapter::GetFormat() { |
| 377 return surface_->GetFormat(); | 377 return surface_->GetFormat(); |
| 378 } | 378 } |
| 379 | 379 |
| 380 VSyncProvider* GLSurfaceAdapter::GetVSyncProvider() { | 380 VSyncProvider* GLSurfaceAdapter::GetVSyncProvider() { |
| 381 return surface_->GetVSyncProvider(); | 381 return surface_->GetVSyncProvider(); |
| 382 } | 382 } |
| 383 | 383 |
| 384 bool GLSurfaceAdapter::ScheduleOverlayPlane(int z_order, | 384 bool GLSurfaceAdapter::ScheduleOverlayPlane(int z_order, |
| 385 OverlayTransform transform, | 385 OverlayTransform transform, |
| 386 gl::GLImage* image, | 386 gl::GLImage* image, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 398 return surface_->FlipsVertically(); | 398 return surface_->FlipsVertically(); |
| 399 } | 399 } |
| 400 | 400 |
| 401 bool GLSurfaceAdapter::BuffersFlipped() const { | 401 bool GLSurfaceAdapter::BuffersFlipped() const { |
| 402 return surface_->BuffersFlipped(); | 402 return surface_->BuffersFlipped(); |
| 403 } | 403 } |
| 404 | 404 |
| 405 GLSurfaceAdapter::~GLSurfaceAdapter() {} | 405 GLSurfaceAdapter::~GLSurfaceAdapter() {} |
| 406 | 406 |
| 407 } // namespace gfx | 407 } // namespace gfx |
| OLD | NEW |