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

Unified Diff: ui/gl/gl_surface_egl.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_surface_egl_x11.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_egl.cc
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
index 4ec7f5c27ce5f7c441580e81e71d16fb60bb712a..a94c14f3aeef2f4c3d9bc21d902e03dce28ad5a3 100644
--- a/ui/gl/gl_surface_egl.cc
+++ b/ui/gl/gl_surface_egl.cc
@@ -103,7 +103,7 @@ extern "C" {
using ui::GetLastEGLErrorString;
-namespace gfx {
+namespace gl {
#if defined(OS_WIN)
unsigned int NativeViewGLSurfaceEGL::current_swap_generation_ = 0;
@@ -126,8 +126,7 @@ bool g_egl_surfaceless_context_supported = false;
bool g_egl_surface_orientation_supported = false;
bool g_use_direct_composition = false;
-class EGLSyncControlVSyncProvider
- : public gfx::SyncControlVSyncProvider {
+class EGLSyncControlVSyncProvider : public gl::SyncControlVSyncProvider {
public:
explicit EGLSyncControlVSyncProvider(EGLSurface surface)
: SyncControlVSyncProvider(),
@@ -488,7 +487,7 @@ bool GLSurfaceEGL::InitializeOneOff() {
// EGL_KHR_surfaceless_context is supported but ensure
// GL_OES_surfaceless_context is also supported. We need a current context
// to query for supported GL extensions.
- scoped_refptr<GLSurface> surface = new SurfacelessEGL(Size(1, 1));
+ scoped_refptr<GLSurface> surface = new SurfacelessEGL(gfx::Size(1, 1));
scoped_refptr<GLContext> context = GLContext::CreateGLContext(
NULL, surface.get(), PreferIntegratedGpu);
if (!context->MakeCurrent(surface.get()))
@@ -637,7 +636,7 @@ bool NativeViewGLSurfaceEGL::Initialize(GLSurface::Format format) {
}
bool NativeViewGLSurfaceEGL::Initialize(
- std::unique_ptr<VSyncProvider> sync_provider) {
+ std::unique_ptr<gfx::VSyncProvider> sync_provider) {
DCHECK(!surface_);
if (!GetDisplay()) {
@@ -663,7 +662,7 @@ bool NativeViewGLSurfaceEGL::Initialize(
egl_window_attributes.push_back(size_.height());
}
- if (gfx::g_driver_egl.ext.b_EGL_NV_post_sub_buffer) {
+ if (gl::g_driver_egl.ext.b_EGL_NV_post_sub_buffer) {
egl_window_attributes.push_back(EGL_POST_SUB_BUFFER_SUPPORTED_NV);
egl_window_attributes.push_back(EGL_TRUE);
}
@@ -700,7 +699,7 @@ bool NativeViewGLSurfaceEGL::Initialize(
return false;
}
- if (gfx::g_driver_egl.ext.b_EGL_NV_post_sub_buffer) {
+ if (gl::g_driver_egl.ext.b_EGL_NV_post_sub_buffer) {
EGLint surfaceVal;
EGLBoolean retVal = eglQuerySurface(
GetDisplay(), surface_, EGL_POST_SUB_BUFFER_SUPPORTED_NV, &surfaceVal);
@@ -892,15 +891,16 @@ gfx::SwapResult NativeViewGLSurfaceEGL::CommitOverlayPlanes() {
: gfx::SwapResult::SWAP_FAILED;
}
-VSyncProvider* NativeViewGLSurfaceEGL::GetVSyncProvider() {
+gfx::VSyncProvider* NativeViewGLSurfaceEGL::GetVSyncProvider() {
return vsync_provider_.get();
}
-bool NativeViewGLSurfaceEGL::ScheduleOverlayPlane(int z_order,
- OverlayTransform transform,
- gl::GLImage* image,
- const Rect& bounds_rect,
- const RectF& crop_rect) {
+bool NativeViewGLSurfaceEGL::ScheduleOverlayPlane(
+ int z_order,
+ gfx::OverlayTransform transform,
+ gl::GLImage* image,
+ const gfx::Rect& bounds_rect,
+ const gfx::RectF& crop_rect) {
#if !defined(OS_ANDROID)
NOTIMPLEMENTED();
return false;
@@ -1056,10 +1056,10 @@ void* PbufferGLSurfaceEGL::GetShareHandle() {
NOTREACHED();
return NULL;
#else
- if (!gfx::g_driver_egl.ext.b_EGL_ANGLE_query_surface_pointer)
+ if (!gl::g_driver_egl.ext.b_EGL_ANGLE_query_surface_pointer)
return NULL;
- if (!gfx::g_driver_egl.ext.b_EGL_ANGLE_surface_d3d_texture_2d_share_handle)
+ if (!gl::g_driver_egl.ext.b_EGL_ANGLE_surface_d3d_texture_2d_share_handle)
return NULL;
void* handle;
@@ -1130,4 +1130,4 @@ void* SurfacelessEGL::GetShareHandle() {
SurfacelessEGL::~SurfacelessEGL() {
}
-} // namespace gfx
+} // namespace gl
« no previous file with comments | « ui/gl/gl_surface_egl.h ('k') | ui/gl/gl_surface_egl_x11.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698