Chromium Code Reviews| 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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 724 int height) { | 724 int height) { |
| 725 DCHECK(supports_post_sub_buffer_); | 725 DCHECK(supports_post_sub_buffer_); |
| 726 if (!eglPostSubBufferNV(GetDisplay(), surface_, x, y, width, height)) { | 726 if (!eglPostSubBufferNV(GetDisplay(), surface_, x, y, width, height)) { |
| 727 DVLOG(1) << "eglPostSubBufferNV failed with error " | 727 DVLOG(1) << "eglPostSubBufferNV failed with error " |
| 728 << GetLastEGLErrorString(); | 728 << GetLastEGLErrorString(); |
| 729 return gfx::SwapResult::SWAP_FAILED; | 729 return gfx::SwapResult::SWAP_FAILED; |
| 730 } | 730 } |
| 731 return gfx::SwapResult::SWAP_ACK; | 731 return gfx::SwapResult::SWAP_ACK; |
| 732 } | 732 } |
| 733 | 733 |
| 734 bool NativeViewGLSurfaceEGL::SupportsCommitOverlayPlanes() { | |
| 735 return true; | |
|
piman
2015/11/25 06:49:28
This is not right for GLSurfaceOzoneEGL, which inh
watk
2015/11/25 21:10:13
Oops, I didn't really mean to include this change.
| |
| 736 } | |
| 737 | |
| 738 gfx::SwapResult NativeViewGLSurfaceEGL::CommitOverlayPlanes() { | |
| 739 return gfx::SwapResult::SWAP_ACK; | |
|
piman
2015/11/25 06:49:28
It feels like the planes should be scheduled only
watk
2015/11/25 21:10:13
Yeah, I can do that (removed for this CL). I think
| |
| 740 } | |
| 741 | |
| 734 VSyncProvider* NativeViewGLSurfaceEGL::GetVSyncProvider() { | 742 VSyncProvider* NativeViewGLSurfaceEGL::GetVSyncProvider() { |
| 735 return vsync_provider_.get(); | 743 return vsync_provider_.get(); |
| 736 } | 744 } |
| 737 | 745 |
| 738 void NativeViewGLSurfaceEGL::OnSetSwapInterval(int interval) { | 746 void NativeViewGLSurfaceEGL::OnSetSwapInterval(int interval) { |
| 739 swap_interval_ = interval; | 747 swap_interval_ = interval; |
| 740 } | 748 } |
| 741 | 749 |
| 742 NativeViewGLSurfaceEGL::~NativeViewGLSurfaceEGL() { | 750 NativeViewGLSurfaceEGL::~NativeViewGLSurfaceEGL() { |
| 743 Destroy(); | 751 Destroy(); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 914 } | 922 } |
| 915 | 923 |
| 916 void* SurfacelessEGL::GetShareHandle() { | 924 void* SurfacelessEGL::GetShareHandle() { |
| 917 return NULL; | 925 return NULL; |
| 918 } | 926 } |
| 919 | 927 |
| 920 SurfacelessEGL::~SurfacelessEGL() { | 928 SurfacelessEGL::~SurfacelessEGL() { |
| 921 } | 929 } |
| 922 | 930 |
| 923 } // namespace gfx | 931 } // namespace gfx |
| OLD | NEW |