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/gfx/gl/gl_surface_android.h" | 5 #include "ui/gfx/gl/gl_surface_android.h" |
6 | 6 |
7 #include <EGL/egl.h> | 7 #include <EGL/egl.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 default: | 31 default: |
32 NOTREACHED(); | 32 NOTREACHED(); |
33 break; | 33 break; |
34 } | 34 } |
35 | 35 |
36 initialized = true; | 36 initialized = true; |
37 return true; | 37 return true; |
38 } | 38 } |
39 // static | 39 // static |
40 scoped_refptr<GLSurface> | 40 scoped_refptr<GLSurface> |
41 GLSurface::CreateViewGLSurface(bool software, gfx::PluginWindowHandle window) { | 41 GLSurface::CreateViewGLSurface(bool software, gfx::AcceleratedWidget window) { |
42 if (software) | 42 if (software) |
43 return NULL; | 43 return NULL; |
44 | 44 |
45 switch (GetGLImplementation()) { | 45 switch (GetGLImplementation()) { |
46 case kGLImplementationEGLGLES2: { | 46 case kGLImplementationEGLGLES2: { |
47 // window is unused | 47 // window is unused |
48 scoped_refptr<AndroidViewSurface> surface(new AndroidViewSurface()); | 48 scoped_refptr<AndroidViewSurface> surface(new AndroidViewSurface()); |
49 if (!surface->Initialize()) | 49 if (!surface->Initialize()) |
50 return NULL; | 50 return NULL; |
51 return surface; | 51 return surface; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 DCHECK(GetHandle()); | 172 DCHECK(GetHandle()); |
173 NativeViewGLSurfaceEGL::Destroy(); | 173 NativeViewGLSurfaceEGL::Destroy(); |
174 window_ = NULL; | 174 window_ = NULL; |
175 | 175 |
176 pbuffer_surface_ = new PbufferGLSurfaceEGL(false, Size(1,1)); | 176 pbuffer_surface_ = new PbufferGLSurfaceEGL(false, Size(1,1)); |
177 pbuffer_surface_->Initialize(); | 177 pbuffer_surface_->Initialize(); |
178 } | 178 } |
179 } | 179 } |
180 | 180 |
181 } // namespace gfx | 181 } // namespace gfx |
OLD | NEW |