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 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 } | 757 } |
758 | 758 |
759 bool NativeViewGLSurfaceEGL::SupportsPostSubBuffer() { | 759 bool NativeViewGLSurfaceEGL::SupportsPostSubBuffer() { |
760 return supports_post_sub_buffer_; | 760 return supports_post_sub_buffer_; |
761 } | 761 } |
762 | 762 |
763 bool NativeViewGLSurfaceEGL::FlipsVertically() const { | 763 bool NativeViewGLSurfaceEGL::FlipsVertically() const { |
764 return flips_vertically_; | 764 return flips_vertically_; |
765 } | 765 } |
766 | 766 |
| 767 bool NativeViewGLSurfaceEGL::BuffersFlipped() const { |
| 768 return g_use_direct_composition; |
| 769 } |
| 770 |
767 gfx::SwapResult NativeViewGLSurfaceEGL::PostSubBuffer(int x, | 771 gfx::SwapResult NativeViewGLSurfaceEGL::PostSubBuffer(int x, |
768 int y, | 772 int y, |
769 int width, | 773 int width, |
770 int height) { | 774 int height) { |
771 DCHECK(supports_post_sub_buffer_); | 775 DCHECK(supports_post_sub_buffer_); |
772 if (!CommitAndClearPendingOverlays()) { | 776 if (!CommitAndClearPendingOverlays()) { |
773 DVLOG(1) << "Failed to commit pending overlay planes."; | 777 DVLOG(1) << "Failed to commit pending overlay planes."; |
774 return gfx::SwapResult::SWAP_FAILED; | 778 return gfx::SwapResult::SWAP_FAILED; |
775 } | 779 } |
776 if (flips_vertically_) { | 780 if (flips_vertically_) { |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 } | 1028 } |
1025 | 1029 |
1026 void* SurfacelessEGL::GetShareHandle() { | 1030 void* SurfacelessEGL::GetShareHandle() { |
1027 return NULL; | 1031 return NULL; |
1028 } | 1032 } |
1029 | 1033 |
1030 SurfacelessEGL::~SurfacelessEGL() { | 1034 SurfacelessEGL::~SurfacelessEGL() { |
1031 } | 1035 } |
1032 | 1036 |
1033 } // namespace gfx | 1037 } // namespace gfx |
OLD | NEW |