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

Side by Side Diff: ui/gl/gl_surface.cc

Issue 1168993002: Update the native_viewport interface to allow specification of the surface configuration, currently… (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix header issue Created 5 years, 6 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
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 fallback_to_osmesa, 154 fallback_to_osmesa,
155 gpu_service_logging, 155 gpu_service_logging,
156 disable_gl_drawing)); 156 disable_gl_drawing));
157 } 157 }
158 158
159 // static 159 // static
160 void GLSurface::InitializeDynamicMockBindingsForTests(GLContext* context) { 160 void GLSurface::InitializeDynamicMockBindingsForTests(GLContext* context) {
161 CHECK(InitializeDynamicGLBindings(kGLImplementationMockGL, context)); 161 CHECK(InitializeDynamicGLBindings(kGLImplementationMockGL, context));
162 } 162 }
163 163
164 GLSurface::GLSurface() {} 164 GLSurface::GLSurface(SurfaceConfiguration requested_configuration)
165 : surface_configuration_(requested_configuration) {
166 }
165 167
166 bool GLSurface::Initialize() { 168 bool GLSurface::Initialize() {
167 return true; 169 return true;
168 } 170 }
169 171
170 void GLSurface::DestroyAndTerminateDisplay() { 172 void GLSurface::DestroyAndTerminateDisplay() {
171 Destroy(); 173 Destroy();
172 } 174 }
173 175
174 bool GLSurface::Resize(const gfx::Size& size) { 176 bool GLSurface::Resize(const gfx::Size& size) {
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 289
288 std::string delimited_name(name); 290 std::string delimited_name(name);
289 delimited_name += " "; 291 delimited_name += " ";
290 292
291 return extensions.find(delimited_name) != std::string::npos; 293 return extensions.find(delimited_name) != std::string::npos;
292 } 294 }
293 295
294 void GLSurface::OnSetSwapInterval(int interval) { 296 void GLSurface::OnSetSwapInterval(int interval) {
295 } 297 }
296 298
297 GLSurfaceAdapter::GLSurfaceAdapter(GLSurface* surface) : surface_(surface) {} 299 GLSurfaceAdapter::GLSurfaceAdapter(GLSurface* surface)
300 : GLSurface(surface->GetSurfaceConfiguration()), surface_(surface) {
301 }
298 302
299 bool GLSurfaceAdapter::Initialize() { 303 bool GLSurfaceAdapter::Initialize() {
300 return surface_->Initialize(); 304 return surface_->Initialize();
301 } 305 }
302 306
303 void GLSurfaceAdapter::Destroy() { 307 void GLSurfaceAdapter::Destroy() {
304 surface_->Destroy(); 308 surface_->Destroy();
305 } 309 }
306 310
307 bool GLSurfaceAdapter::Resize(const gfx::Size& size) { 311 bool GLSurfaceAdapter::Resize(const gfx::Size& size) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 z_order, transform, image, bounds_rect, crop_rect); 400 z_order, transform, image, bounds_rect, crop_rect);
397 } 401 }
398 402
399 bool GLSurfaceAdapter::IsSurfaceless() const { 403 bool GLSurfaceAdapter::IsSurfaceless() const {
400 return surface_->IsSurfaceless(); 404 return surface_->IsSurfaceless();
401 } 405 }
402 406
403 GLSurfaceAdapter::~GLSurfaceAdapter() {} 407 GLSurfaceAdapter::~GLSurfaceAdapter() {}
404 408
405 } // namespace gfx 409 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698