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_egl.h" | 5 #include "ui/gl/gl_surface_egl.h" |
6 | 6 |
7 #if defined(OS_ANDROID) | 7 #if defined(OS_ANDROID) |
8 #include <android/native_window_jni.h> | 8 #include <android/native_window_jni.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 } | 675 } |
676 | 676 |
677 EGLConfig SurfacelessEGL::GetConfig() { | 677 EGLConfig SurfacelessEGL::GetConfig() { |
678 return g_config; | 678 return g_config; |
679 } | 679 } |
680 | 680 |
681 bool SurfacelessEGL::IsOffscreen() { | 681 bool SurfacelessEGL::IsOffscreen() { |
682 return true; | 682 return true; |
683 } | 683 } |
684 | 684 |
| 685 bool SurfacelessEGL::IsSurfaceless() const { |
| 686 return true; |
| 687 } |
| 688 |
685 bool SurfacelessEGL::SwapBuffers() { | 689 bool SurfacelessEGL::SwapBuffers() { |
686 LOG(ERROR) << "Attempted to call SwapBuffers with SurfacelessEGL."; | 690 LOG(ERROR) << "Attempted to call SwapBuffers with SurfacelessEGL."; |
687 return false; | 691 return false; |
688 } | 692 } |
689 | 693 |
690 gfx::Size SurfacelessEGL::GetSize() { | 694 gfx::Size SurfacelessEGL::GetSize() { |
691 return size_; | 695 return size_; |
692 } | 696 } |
693 | 697 |
694 bool SurfacelessEGL::Resize(const gfx::Size& size) { | 698 bool SurfacelessEGL::Resize(const gfx::Size& size) { |
695 size_ = size; | 699 size_ = size; |
696 return true; | 700 return true; |
697 } | 701 } |
698 | 702 |
699 EGLSurface SurfacelessEGL::GetHandle() { | 703 EGLSurface SurfacelessEGL::GetHandle() { |
700 return EGL_NO_SURFACE; | 704 return EGL_NO_SURFACE; |
701 } | 705 } |
702 | 706 |
703 void* SurfacelessEGL::GetShareHandle() { | 707 void* SurfacelessEGL::GetShareHandle() { |
704 return NULL; | 708 return NULL; |
705 } | 709 } |
706 | 710 |
707 SurfacelessEGL::~SurfacelessEGL() { | 711 SurfacelessEGL::~SurfacelessEGL() { |
708 } | 712 } |
709 | 713 |
710 } // namespace gfx | 714 } // namespace gfx |
OLD | NEW |