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

Side by Side Diff: ui/ozone/platform/cast/surface_factory_cast.cc

Issue 2190353003: Delete old Ozone surface creation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months 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/ozone/platform/cast/surface_factory_cast.h ('k') | ui/ozone/platform/drm/gpu/drm_thread.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ozone/platform/cast/surface_factory_cast.h" 5 #include "ui/ozone/platform/cast/surface_factory_cast.h"
6 6
7 #include <EGL/egl.h> 7 #include <EGL/egl.h>
8 #include <dlfcn.h> 8 #include <dlfcn.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 previous_frame_overlay_count_ = overlay_count_; 160 previous_frame_overlay_count_ = overlay_count_;
161 previous_frame_overlay_bounds_ = overlay_bounds_; 161 previous_frame_overlay_bounds_ = overlay_bounds_;
162 overlay_count_ = 0; 162 overlay_count_ = 0;
163 } 163 }
164 164
165 void SurfaceFactoryCast::OnOverlayScheduled(const gfx::Rect& display_bounds) { 165 void SurfaceFactoryCast::OnOverlayScheduled(const gfx::Rect& display_bounds) {
166 ++overlay_count_; 166 ++overlay_count_;
167 overlay_bounds_ = display_bounds; 167 overlay_bounds_ = display_bounds;
168 } 168 }
169 169
170 bool SurfaceFactoryCast::UseNewSurfaceAPI() {
171 return true;
172 }
173
174 scoped_refptr<gl::GLSurface> SurfaceFactoryCast::CreateViewGLSurface( 170 scoped_refptr<gl::GLSurface> SurfaceFactoryCast::CreateViewGLSurface(
175 gl::GLImplementation implementation, 171 gl::GLImplementation implementation,
176 gfx::AcceleratedWidget widget) { 172 gfx::AcceleratedWidget widget) {
177 if (implementation != gl::kGLImplementationEGLGLES2) { 173 if (implementation != gl::kGLImplementationEGLGLES2) {
178 NOTREACHED(); 174 NOTREACHED();
179 return nullptr; 175 return nullptr;
180 } 176 }
181 177
182 // Verify requested widget dimensions match our current display size. 178 // Verify requested widget dimensions match our current display size.
183 DCHECK_EQ(widget >> 16, display_size_.width()); 179 DCHECK_EQ(widget >> 16, display_size_.width());
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 return false; 325 return false;
330 } 326 }
331 327
332 set_gl_get_proc_address.Run(gl_proc); 328 set_gl_get_proc_address.Run(gl_proc);
333 add_gl_library.Run(lib_egl); 329 add_gl_library.Run(lib_egl);
334 add_gl_library.Run(lib_gles2); 330 add_gl_library.Run(lib_gles2);
335 return true; 331 return true;
336 } 332 }
337 333
338 } // namespace ui 334 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/cast/surface_factory_cast.h ('k') | ui/ozone/platform/drm/gpu/drm_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698