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

Unified Diff: ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc

Issue 1167533007: Revert of ozone: Remove singleton pattern for SurfaceFactoryOzone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/ozone/gpu/BUILD.gn ('k') | ui/ozone/gpu/ozone_gpu.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
diff --git a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
index babdc6767d6b73391733ef3b1407cf020a2a0ba0..df7fca4c62fa16b131e97bbf3294bb62e667d909 100644
--- a/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
+++ b/ui/ozone/gpu/gpu_memory_buffer_factory_ozone_native_buffer.cc
@@ -8,7 +8,6 @@
#include "ui/gl/gl_image_egl.h"
#include "ui/gl/gl_image_linux_dma_buffer.h"
#include "ui/ozone/public/native_pixmap.h"
-#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/surface_factory_ozone.h"
#include "ui/ozone/public/surface_ozone_egl.h"
@@ -36,10 +35,8 @@
gfx::OverlayTransform transform,
const gfx::Rect& bounds_rect,
const gfx::RectF& crop_rect) override {
- return OzonePlatform::GetInstance()
- ->GetSurfaceFactoryOzone()
- ->ScheduleOverlayPlane(widget, z_order, transform, pixmap_, bounds_rect,
- crop_rect);
+ return SurfaceFactoryOzone::GetInstance()->ScheduleOverlayPlane(
+ widget, z_order, transform, pixmap_, bounds_rect, crop_rect);
}
protected:
@@ -75,10 +72,8 @@
gfx::OverlayTransform transform,
const gfx::Rect& bounds_rect,
const gfx::RectF& crop_rect) override {
- return OzonePlatform::GetInstance()
- ->GetSurfaceFactoryOzone()
- ->ScheduleOverlayPlane(widget, z_order, transform, pixmap_, bounds_rect,
- crop_rect);
+ return SurfaceFactoryOzone::GetInstance()->ScheduleOverlayPlane(
+ widget, z_order, transform, pixmap_, bounds_rect, crop_rect);
}
protected:
@@ -149,10 +144,9 @@
int client_id,
gfx::PluginWindowHandle surface_handle) {
scoped_refptr<NativePixmap> pixmap =
- OzonePlatform::GetInstance()
- ->GetSurfaceFactoryOzone()
- ->CreateNativePixmap(surface_handle, size, GetOzoneFormatFor(format),
- GetOzoneUsageFor(usage));
+ SurfaceFactoryOzone::GetInstance()->CreateNativePixmap(
+ surface_handle, size, GetOzoneFormatFor(format),
+ GetOzoneUsageFor(usage));
if (!pixmap.get()) {
LOG(ERROR) << "Failed to create pixmap " << size.width() << "x"
<< size.height() << " format " << format << ", usage " << usage;
« no previous file with comments | « ui/ozone/gpu/BUILD.gn ('k') | ui/ozone/gpu/ozone_gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698