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

Side by Side Diff: ui/ozone/platform/drm/gpu/gbm_surface_factory.cc

Issue 2253173002: Remove callbacks for SurfaceFactoryOzone::LoadEGLGLES2Bindings(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/drm/gpu/gbm_surface_factory.h" 5 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h"
6 6
7 #include <gbm.h> 7 #include <gbm.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 DCHECK_EQ(size.height(), 0); 96 DCHECK_EQ(size.height(), 0);
97 97
98 return gl::InitializeGLSurface(new gl::SurfacelessEGL(size)); 98 return gl::InitializeGLSurface(new gl::SurfacelessEGL(size));
99 } 99 }
100 100
101 intptr_t GbmSurfaceFactory::GetNativeDisplay() { 101 intptr_t GbmSurfaceFactory::GetNativeDisplay() {
102 DCHECK(thread_checker_.CalledOnValidThread()); 102 DCHECK(thread_checker_.CalledOnValidThread());
103 return EGL_DEFAULT_DISPLAY; 103 return EGL_DEFAULT_DISPLAY;
104 } 104 }
105 105
106 bool GbmSurfaceFactory::LoadEGLGLES2Bindings( 106 bool GbmSurfaceFactory::LoadEGLGLES2Bindings() {
107 AddGLLibraryCallback add_gl_library,
108 SetGLGetProcAddressProcCallback set_gl_get_proc_address) {
109 DCHECK(thread_checker_.CalledOnValidThread()); 107 DCHECK(thread_checker_.CalledOnValidThread());
110 return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address); 108 return LoadDefaultEGLGLES2Bindings();
111 } 109 }
112 110
113 std::unique_ptr<SurfaceOzoneCanvas> GbmSurfaceFactory::CreateCanvasForWidget( 111 std::unique_ptr<SurfaceOzoneCanvas> GbmSurfaceFactory::CreateCanvasForWidget(
114 gfx::AcceleratedWidget widget) { 112 gfx::AcceleratedWidget widget) {
115 DCHECK(thread_checker_.CalledOnValidThread()); 113 DCHECK(thread_checker_.CalledOnValidThread());
116 LOG(ERROR) << "Software rendering mode is not supported with GBM platform"; 114 LOG(ERROR) << "Software rendering mode is not supported with GBM platform";
117 return nullptr; 115 return nullptr;
118 } 116 }
119 117
120 std::vector<gfx::BufferFormat> GbmSurfaceFactory::GetScanoutFormats( 118 std::vector<gfx::BufferFormat> GbmSurfaceFactory::GetScanoutFormats(
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 163 }
166 164
167 scoped_refptr<GbmBuffer> buffer = drm_thread_->CreateBufferFromFds( 165 scoped_refptr<GbmBuffer> buffer = drm_thread_->CreateBufferFromFds(
168 widget, size, format, std::move(scoped_fds), planes); 166 widget, size, format, std::move(scoped_fds), planes);
169 if (!buffer) 167 if (!buffer)
170 return nullptr; 168 return nullptr;
171 return make_scoped_refptr(new GbmPixmap(this, buffer)); 169 return make_scoped_refptr(new GbmPixmap(this, buffer));
172 } 170 }
173 171
174 } // namespace ui 172 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/gbm_surface_factory.h ('k') | ui/ozone/platform/headless/headless_surface_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698