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

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

Issue 1240353002: ozone: rename to GpuMemoryBuffer(Factory|Impl)OzoneNativePixmap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits in comments Created 5 years, 5 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
Index: content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc
diff --git a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc
similarity index 67%
rename from content/common/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
rename to content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc
index dfc0e38ee0b4b1c8518c922f1289fd658c00fc6a..e787be94aa3d27b6892d4428ceebdd83e8894e8d 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/common/gpu/gpu_memory_buffer_factory_ozone_native_buffer.h"
+#include "content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h"
#include "base/logging.h"
#include "ui/gl/gl_image.h"
@@ -13,22 +13,19 @@ namespace content {
namespace {
const GpuMemoryBufferFactory::Configuration kSupportedConfigurations[] = {
- { gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::SCANOUT },
- { gfx::GpuMemoryBuffer::RGBX_8888, gfx::GpuMemoryBuffer::SCANOUT }
-};
+ {gfx::GpuMemoryBuffer::BGRA_8888, gfx::GpuMemoryBuffer::SCANOUT},
+ {gfx::GpuMemoryBuffer::RGBX_8888, gfx::GpuMemoryBuffer::SCANOUT}};
} // namespace
-GpuMemoryBufferFactoryOzoneNativeBuffer::
- GpuMemoryBufferFactoryOzoneNativeBuffer() {
-}
+GpuMemoryBufferFactoryOzoneNativePixmap::
+ GpuMemoryBufferFactoryOzoneNativePixmap() {}
-GpuMemoryBufferFactoryOzoneNativeBuffer::
- ~GpuMemoryBufferFactoryOzoneNativeBuffer() {
-}
+GpuMemoryBufferFactoryOzoneNativePixmap::
+ ~GpuMemoryBufferFactoryOzoneNativePixmap() {}
// static
-bool GpuMemoryBufferFactoryOzoneNativeBuffer::
+bool GpuMemoryBufferFactoryOzoneNativePixmap::
IsGpuMemoryBufferConfigurationSupported(gfx::GpuMemoryBuffer::Format format,
gfx::GpuMemoryBuffer::Usage usage) {
for (auto& configuration : kSupportedConfigurations) {
@@ -39,7 +36,7 @@ bool GpuMemoryBufferFactoryOzoneNativeBuffer::
return false;
}
-void GpuMemoryBufferFactoryOzoneNativeBuffer::
+void GpuMemoryBufferFactoryOzoneNativePixmap::
GetSupportedGpuMemoryBufferConfigurations(
std::vector<Configuration>* configurations) {
if (!ui::OzonePlatform::GetInstance()
@@ -53,42 +50,42 @@ void GpuMemoryBufferFactoryOzoneNativeBuffer::
}
gfx::GpuMemoryBufferHandle
-GpuMemoryBufferFactoryOzoneNativeBuffer::CreateGpuMemoryBuffer(
+GpuMemoryBufferFactoryOzoneNativePixmap::CreateGpuMemoryBuffer(
gfx::GpuMemoryBufferId id,
const gfx::Size& size,
gfx::GpuMemoryBuffer::Format format,
gfx::GpuMemoryBuffer::Usage usage,
int client_id,
gfx::PluginWindowHandle surface_handle) {
- if (!ozone_native_buffer_factory_.CreateGpuMemoryBuffer(
+ if (!ozone_native_pixmap_factory_.CreateGpuMemoryBuffer(
id, size, format, usage, client_id, surface_handle)) {
return gfx::GpuMemoryBufferHandle();
}
gfx::GpuMemoryBufferHandle handle;
- handle.type = gfx::OZONE_NATIVE_BUFFER;
+ handle.type = gfx::OZONE_NATIVE_PIXMAP;
handle.id = id;
return handle;
}
-void GpuMemoryBufferFactoryOzoneNativeBuffer::DestroyGpuMemoryBuffer(
+void GpuMemoryBufferFactoryOzoneNativePixmap::DestroyGpuMemoryBuffer(
gfx::GpuMemoryBufferId id,
int client_id) {
- ozone_native_buffer_factory_.DestroyGpuMemoryBuffer(id, client_id);
+ ozone_native_pixmap_factory_.DestroyGpuMemoryBuffer(id, client_id);
}
-gpu::ImageFactory* GpuMemoryBufferFactoryOzoneNativeBuffer::AsImageFactory() {
+gpu::ImageFactory* GpuMemoryBufferFactoryOzoneNativePixmap::AsImageFactory() {
return this;
}
scoped_refptr<gfx::GLImage>
-GpuMemoryBufferFactoryOzoneNativeBuffer::CreateImageForGpuMemoryBuffer(
+GpuMemoryBufferFactoryOzoneNativePixmap::CreateImageForGpuMemoryBuffer(
const gfx::GpuMemoryBufferHandle& handle,
const gfx::Size& size,
gfx::GpuMemoryBuffer::Format format,
unsigned internalformat,
int client_id) {
- DCHECK_EQ(handle.type, gfx::OZONE_NATIVE_BUFFER);
- return ozone_native_buffer_factory_.CreateImageForGpuMemoryBuffer(
+ DCHECK_EQ(handle.type, gfx::OZONE_NATIVE_PIXMAP);
+ return ozone_native_pixmap_factory_.CreateImageForGpuMemoryBuffer(
handle.id, size, format, internalformat, client_id);
}
« no previous file with comments | « content/common/gpu/gpu_memory_buffer_factory_ozone_native_pixmap.h ('k') | content/common/gpu/media/vaapi_drm_picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698