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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 // themselves to the screen right away in |CommitAndClearPendingOverlays|, | 778 // themselves to the screen right away in |CommitAndClearPendingOverlays|, |
779 // rather than being queued and waiting for a "swap" signal. | 779 // rather than being queued and waiting for a "swap" signal. |
780 return CommitAndClearPendingOverlays() ? gfx::SwapResult::SWAP_ACK | 780 return CommitAndClearPendingOverlays() ? gfx::SwapResult::SWAP_ACK |
781 : gfx::SwapResult::SWAP_FAILED; | 781 : gfx::SwapResult::SWAP_FAILED; |
782 } | 782 } |
783 | 783 |
784 VSyncProvider* NativeViewGLSurfaceEGL::GetVSyncProvider() { | 784 VSyncProvider* NativeViewGLSurfaceEGL::GetVSyncProvider() { |
785 return vsync_provider_.get(); | 785 return vsync_provider_.get(); |
786 } | 786 } |
787 | 787 |
788 bool NativeViewGLSurfaceEGL::ScheduleOverlayPlane(int z_order, | 788 bool NativeViewGLSurfaceEGL::ScheduleOverlayPlane( |
789 OverlayTransform transform, | 789 int z_order, OverlayTransform transform, |
790 gl::GLImage* image, | 790 gfx::BufferFormat storage_format, gl::GLImage* image, |
791 const Rect& bounds_rect, | 791 const Rect& bounds_rect, const RectF& crop_rect, |
792 const RectF& crop_rect) { | 792 bool handle_scaling) { |
793 #if !defined(OS_ANDROID) | 793 #if !defined(OS_ANDROID) |
794 NOTIMPLEMENTED(); | 794 NOTIMPLEMENTED(); |
795 return false; | 795 return false; |
796 #else | 796 #else |
797 pending_overlays_.push_back( | 797 pending_overlays_.push_back( |
798 GLSurfaceOverlay(z_order, transform, image, bounds_rect, crop_rect)); | 798 GLSurfaceOverlay(z_order, transform, storage_format, image, bounds_rect, |
| 799 crop_rect, handle_scaling)); |
799 return true; | 800 return true; |
800 #endif | 801 #endif |
801 } | 802 } |
802 | 803 |
803 void NativeViewGLSurfaceEGL::OnSetSwapInterval(int interval) { | 804 void NativeViewGLSurfaceEGL::OnSetSwapInterval(int interval) { |
804 swap_interval_ = interval; | 805 swap_interval_ = interval; |
805 } | 806 } |
806 | 807 |
807 NativeViewGLSurfaceEGL::~NativeViewGLSurfaceEGL() { | 808 NativeViewGLSurfaceEGL::~NativeViewGLSurfaceEGL() { |
808 Destroy(); | 809 Destroy(); |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 } | 991 } |
991 | 992 |
992 void* SurfacelessEGL::GetShareHandle() { | 993 void* SurfacelessEGL::GetShareHandle() { |
993 return NULL; | 994 return NULL; |
994 } | 995 } |
995 | 996 |
996 SurfacelessEGL::~SurfacelessEGL() { | 997 SurfacelessEGL::~SurfacelessEGL() { |
997 } | 998 } |
998 | 999 |
999 } // namespace gfx | 1000 } // namespace gfx |
OLD | NEW |