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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory_linux.cc

Issue 699643002: ui: Remove GLImageGLX. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « content/common/BUILD.gn ('k') | content/common/gpu/gpu_memory_buffer_factory_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_memory_buffer_factory_linux.cc
diff --git a/content/common/gpu/gpu_memory_buffer_factory_x11.cc b/content/common/gpu/gpu_memory_buffer_factory_linux.cc
similarity index 63%
rename from content/common/gpu/gpu_memory_buffer_factory_x11.cc
rename to content/common/gpu/gpu_memory_buffer_factory_linux.cc
index bb9ef567020544b61f493f32f19bb516580424ab..10580f974b2e5ef51002c29fdd59a4977037d596 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_x11.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_linux.cc
@@ -5,7 +5,6 @@
#include "content/common/gpu/gpu_memory_buffer_factory.h"
#include "base/logging.h"
-#include "content/common/gpu/gpu_memory_buffer_factory_x11_pixmap.h"
#include "gpu/command_buffer/service/image_factory.h"
#include "ui/gl/gl_image.h"
#include "ui/gl/gl_image_shared_memory.h"
@@ -22,30 +21,16 @@ class GpuMemoryBufferFactoryImpl : public GpuMemoryBufferFactory,
const gfx::Size& size,
gfx::GpuMemoryBuffer::Format format,
gfx::GpuMemoryBuffer::Usage usage) override {
- switch (handle.type) {
- case gfx::X11_PIXMAP_BUFFER:
- x11_pixmap_factory_.CreateGpuMemoryBuffer(handle.global_id,
- handle.pixmap);
- return handle;
- default:
- NOTREACHED();
- return gfx::GpuMemoryBufferHandle();
- }
+ NOTREACHED();
+ return gfx::GpuMemoryBufferHandle();
}
void DestroyGpuMemoryBuffer(
const gfx::GpuMemoryBufferHandle& handle) override {
- switch (handle.type) {
- case gfx::X11_PIXMAP_BUFFER:
- x11_pixmap_factory_.DestroyGpuMemoryBuffer(handle.global_id);
- break;
- default:
- NOTREACHED();
- break;
- }
+ NOTREACHED();
}
gpu::ImageFactory* AsImageFactory() override { return this; }
- // Overridden from gpu::GpuMemoryBufferFactory:
+ // Overridden from gpu::ImageFactory:
scoped_refptr<gfx::GLImage> CreateImageForGpuMemoryBuffer(
const gfx::GpuMemoryBufferHandle& handle,
const gfx::Size& size,
@@ -61,21 +46,11 @@ class GpuMemoryBufferFactoryImpl : public GpuMemoryBufferFactory,
return image;
}
- case gfx::X11_PIXMAP_BUFFER:
- // Verify that client is the owner of the buffer we're about to use.
- if (handle.global_id.secondary_id != client_id)
- return scoped_refptr<gfx::GLImage>();
-
- return x11_pixmap_factory_.CreateImageForGpuMemoryBuffer(
- handle.global_id, size, internalformat);
default:
NOTREACHED();
return scoped_refptr<gfx::GLImage>();
}
}
-
- private:
- GpuMemoryBufferFactoryX11Pixmap x11_pixmap_factory_;
};
} // namespace
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/gpu/gpu_memory_buffer_factory_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698