| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "gpu/gles2_conform_support/egl/surface.h" | 5 #include "gpu/gles2_conform_support/egl/surface.h" |
| 6 #include "ui/gl/gl_surface.h" | 6 #include "ui/gl/gl_surface.h" |
| 7 | 7 |
| 8 namespace egl { | 8 namespace egl { |
| 9 | 9 |
| 10 Surface::Surface(gfx::GLSurface* gl_surface, const Config* config) | 10 Surface::Surface(gl::GLSurface* gl_surface, const Config* config) |
| 11 : is_current_in_some_thread_(false), | 11 : is_current_in_some_thread_(false), |
| 12 gl_surface_(gl_surface), | 12 gl_surface_(gl_surface), |
| 13 config_(config) {} | 13 config_(config) {} |
| 14 | 14 |
| 15 Surface::~Surface() { | 15 Surface::~Surface() { |
| 16 } | 16 } |
| 17 | 17 |
| 18 gfx::GLSurface* Surface::gl_surface() const { | 18 gl::GLSurface* Surface::gl_surface() const { |
| 19 return gl_surface_.get(); | 19 return gl_surface_.get(); |
| 20 } | 20 } |
| 21 | 21 |
| 22 const Config* Surface::config() const { | 22 const Config* Surface::config() const { |
| 23 return config_; | 23 return config_; |
| 24 } | 24 } |
| 25 | 25 |
| 26 bool Surface::ValidatePbufferAttributeList(const EGLint* attrib_list) { | 26 bool Surface::ValidatePbufferAttributeList(const EGLint* attrib_list) { |
| 27 if (attrib_list) { | 27 if (attrib_list) { |
| 28 for (int i = 0; attrib_list[i] != EGL_NONE; i += 2) { | 28 for (int i = 0; attrib_list[i] != EGL_NONE; i += 2) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool Surface::ValidateWindowAttributeList(const EGLint* attrib_list) { | 41 bool Surface::ValidateWindowAttributeList(const EGLint* attrib_list) { |
| 42 if (attrib_list) { | 42 if (attrib_list) { |
| 43 if (attrib_list[0] != EGL_NONE) | 43 if (attrib_list[0] != EGL_NONE) |
| 44 return false; | 44 return false; |
| 45 } | 45 } |
| 46 return true; | 46 return true; |
| 47 } | 47 } |
| 48 } // namespace egl | 48 } // namespace egl |
| OLD | NEW |