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

Unified Diff: ui/gl/gl_surface_glx.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_glx.h ('k') | ui/gl/gl_surface_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_glx.cc
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index 89fc9806bcaea5e8eab9daca33140c6a2046146f..9bb4d7a2125a238575a8190f43de954e15b3c7bd 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -30,7 +30,7 @@ extern "C" {
#include "ui/gl/gl_implementation.h"
#include "ui/gl/sync_control_vsync_provider.h"
-namespace gfx {
+namespace gl {
namespace {
@@ -115,8 +115,7 @@ GLXFBConfig GetConfigForWindow(Display* display,
return nullptr;
}
-class OMLSyncControlVSyncProvider
- : public gfx::SyncControlVSyncProvider {
+class OMLSyncControlVSyncProvider : public gl::SyncControlVSyncProvider {
public:
explicit OMLSyncControlVSyncProvider(GLXWindow glx_window)
: SyncControlVSyncProvider(),
@@ -223,7 +222,8 @@ class SGIVideoSyncProviderThreadShim {
DCHECK(nullptr != context_);
}
- void GetVSyncParameters(const VSyncProvider::UpdateVSyncCallback& callback) {
+ void GetVSyncParameters(
+ const gfx::VSyncProvider::UpdateVSyncCallback& callback) {
base::TimeTicks now;
{
// Don't allow |window_| destruction while we're probing vsync.
@@ -254,7 +254,7 @@ class SGIVideoSyncProviderThreadShim {
private:
// For initialization of display_ in GLSurface::InitializeOneOff before
// the sandbox goes up.
- friend class gfx::GLSurfaceGLX;
+ friend class gl::GLSurfaceGLX;
static Display* display_;
@@ -298,7 +298,7 @@ class SGIVideoSyncVSyncProvider
}
void GetVSyncParameters(
- const VSyncProvider::UpdateVSyncCallback& callback) override {
+ const gfx::VSyncProvider::UpdateVSyncCallback& callback) override {
if (kGetVSyncParametersMinSeconds > 0) {
base::TimeTicks now = base::TimeTicks::Now();
base::TimeDelta delta = now - last_get_vsync_parameters_time_;
@@ -310,7 +310,7 @@ class SGIVideoSyncVSyncProvider
// Only one outstanding request per surface.
if (!pending_callback_) {
pending_callback_.reset(
- new VSyncProvider::UpdateVSyncCallback(callback));
+ new gfx::VSyncProvider::UpdateVSyncCallback(callback));
vsync_thread_->message_loop()->PostTask(
FROM_HERE,
base::Bind(&SGIVideoSyncProviderThreadShim::GetVSyncParameters,
@@ -334,7 +334,7 @@ class SGIVideoSyncVSyncProvider
// Thread shim through which the sync provider is accessed on |vsync_thread_|.
std::unique_ptr<SGIVideoSyncProviderThreadShim> shim_;
- std::unique_ptr<VSyncProvider::UpdateVSyncCallback> pending_callback_;
+ std::unique_ptr<gfx::VSyncProvider::UpdateVSyncCallback> pending_callback_;
// Raw pointers to sync primitives owned by the shim_.
// These will only be referenced before we post a task to destroy
@@ -554,7 +554,7 @@ void* NativeViewGLSurfaceGLX::GetHandle() {
}
bool NativeViewGLSurfaceGLX::SupportsPostSubBuffer() {
- return gfx::g_driver_glx.ext.b_GLX_MESA_copy_sub_buffer;
+ return gl::g_driver_glx.ext.b_GLX_MESA_copy_sub_buffer;
}
void* NativeViewGLSurfaceGLX::GetConfig() {
@@ -567,12 +567,12 @@ gfx::SwapResult NativeViewGLSurfaceGLX::PostSubBuffer(int x,
int y,
int width,
int height) {
- DCHECK(gfx::g_driver_glx.ext.b_GLX_MESA_copy_sub_buffer);
+ DCHECK(gl::g_driver_glx.ext.b_GLX_MESA_copy_sub_buffer);
glXCopySubBufferMESA(g_display, GetDrawableHandle(), x, y, width, height);
return gfx::SwapResult::SWAP_ACK;
}
-VSyncProvider* NativeViewGLSurfaceGLX::GetVSyncProvider() {
+gfx::VSyncProvider* NativeViewGLSurfaceGLX::GetVSyncProvider() {
return vsync_provider_.get();
}
@@ -645,4 +645,4 @@ UnmappedNativeViewGLSurfaceGLX::~UnmappedNativeViewGLSurfaceGLX() {
Destroy();
}
-} // namespace gfx
+} // namespace gl
« no previous file with comments | « ui/gl/gl_surface_glx.h ('k') | ui/gl/gl_surface_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698