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

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

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/public/cpp/bitmap_uploader.h ('k') | services/ui/public/cpp/context_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/public/cpp/bitmap_uploader.cc
diff --git a/services/ui/public/cpp/bitmap_uploader.cc b/services/ui/public/cpp/bitmap_uploader.cc
index 75af7b3f24b79b22f85686db143beca03321c3d4..53e6c17db6401d4962798d00ee2677338ce60a2b 100644
--- a/services/ui/public/cpp/bitmap_uploader.cc
+++ b/services/ui/public/cpp/bitmap_uploader.cc
@@ -27,8 +27,9 @@ const uint32_t g_transparent_color = 0x00000000;
const char kBitmapUploaderForAcceleratedWidget[] =
"__BITMAP_UPLOADER_ACCELERATED_WIDGET__";
-BitmapUploader::BitmapUploader(Window* window)
+BitmapUploader::BitmapUploader(Window* window, GpuService* gpu_service)
: window_(window),
+ gpu_service_(gpu_service),
color_(g_transparent_color),
width_(0),
height_(0),
@@ -43,7 +44,7 @@ void BitmapUploader::Init() {
surface_->BindToThread();
surface_->set_client(this);
- gles2_context_ = GLES2Context::CreateOffscreenContext(std::vector<int32_t>());
+ gles2_context_ = GLES2Context::CreateOffscreenContext(gpu_service_);
// CreateOffscreenContext() may return null.
}
« no previous file with comments | « services/ui/public/cpp/bitmap_uploader.h ('k') | services/ui/public/cpp/context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698