Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: ui/gl/gl_surface_egl.cc

Issue 1513283002: Add support to send optimal format as part of ScheduleOverlayPlane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update cmd_buffer_functions Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_surface_overlay.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_surface_overlay.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698