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

Unified Diff: services/ui/public/cpp/bitmap_uploader.h

Issue 2233003003: services/ui: Inject GpuService instance where needed, instead of singleton. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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 | « services/ui/demo/mus_demo.cc ('k') | services/ui/public/cpp/bitmap_uploader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/bitmap_uploader.h
diff --git a/services/ui/public/cpp/bitmap_uploader.h b/services/ui/public/cpp/bitmap_uploader.h
index 1f0898e8bf97c9bf8ea0a04c8616545509991b98..ca65951589d94b6ba45f58fd680572f6de67c3f0 100644
--- a/services/ui/public/cpp/bitmap_uploader.h
+++ b/services/ui/public/cpp/bitmap_uploader.h
@@ -20,6 +20,7 @@
namespace ui {
class GLES2Context;
+class GpuService;
extern const char kBitmapUploaderForAcceleratedWidget[];
@@ -27,7 +28,7 @@ extern const char kBitmapUploaderForAcceleratedWidget[];
// Window.
class BitmapUploader : public WindowSurfaceClient {
public:
- explicit BitmapUploader(Window* window);
+ BitmapUploader(Window* window, GpuService* gpu_service);
~BitmapUploader() override;
void Init();
@@ -62,11 +63,12 @@ class BitmapUploader : public WindowSurfaceClient {
WindowSurface* surface,
mojo::Array<cc::ReturnedResource> resources) override;
- ui::Window* window_;
- std::unique_ptr<ui::WindowSurface> surface_;
+ Window* window_;
+ std::unique_ptr<WindowSurface> surface_;
// This may be null if there is an error contacting mus/initializing. We
// assume we'll be shutting down soon and do nothing in this case.
- std::unique_ptr<ui::GLES2Context> gles2_context_;
+ std::unique_ptr<GLES2Context> gles2_context_;
+ GpuService* gpu_service_;
uint32_t color_;
int width_;
« no previous file with comments | « services/ui/demo/mus_demo.cc ('k') | services/ui/public/cpp/bitmap_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698