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

Unified Diff: ui/ozone/platform/egltest/ozone_platform_egltest.cc

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Introduce OzoneClient Created 5 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
Index: ui/ozone/platform/egltest/ozone_platform_egltest.cc
diff --git a/ui/ozone/platform/egltest/ozone_platform_egltest.cc b/ui/ozone/platform/egltest/ozone_platform_egltest.cc
index adfadf99bba9cdd9e0fd62ea6e6f4d5b657107e1..de1f283a66be7df3ba9beddc843907b8d7e7a695 100644
--- a/ui/ozone/platform/egltest/ozone_platform_egltest.cc
+++ b/ui/ozone/platform/egltest/ozone_platform_egltest.cc
@@ -26,8 +26,10 @@
#include "ui/ozone/public/cursor_factory_ozone.h"
#include "ui/ozone/public/gpu_platform_support.h"
#include "ui/ozone/public/gpu_platform_support_host.h"
+#include "ui/ozone/public/ozone_client.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/ozone_switches.h"
+#include "ui/ozone/public/surface_client_factory_ozone.h"
#include "ui/ozone/public/surface_factory_ozone.h"
#include "ui/ozone/public/surface_ozone_egl.h"
#include "ui/ozone/public/system_input_injector.h"
@@ -400,6 +402,32 @@ class OzonePlatformEgltest : public OzonePlatform {
DISALLOW_COPY_AND_ASSIGN(OzonePlatformEgltest);
};
+class OzoneClientEgltest : public OzoneClient {
+ public:
+ OzoneClientEgltest() {}
+ ~OzoneClientEgltest() override {}
+
+ // OzoneClient:
+ SurfaceClientFactoryOzone* GetSurfaceClientFactoryOzone() override {
+ return surface_client_.get();
+ }
+
+ void InitializeUI() override {
+ if (!surface_client_)
+ surface_client_.reset(new SurfaceClientFactoryOzone);
+ }
+
+ void InitializeRenderer() override {
+ if (!surface_client_)
+ surface_client_.reset(new SurfaceClientFactoryOzone);
+ }
+
+ private:
+ scoped_ptr<SurfaceClientFactoryOzone> surface_client_;
+
+ DISALLOW_COPY_AND_ASSIGN(OzoneClientEgltest);
+};
+
} // namespace
OzonePlatform* CreateOzonePlatformEgltest() {
@@ -408,4 +436,8 @@ OzonePlatform* CreateOzonePlatformEgltest() {
return platform;
}
+OzoneClient* CreateOzoneClientEgltest() {
+ return new OzoneClientEgltest;
+}
+
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698