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

Unified Diff: components/bitmap_uploader/bitmap_uploader.cc

Issue 1976703003: Impl mus::mojom::GpuService to enable using Chrome IPC version gpu CmdBuf in mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 | « components/bitmap_uploader/bitmap_uploader.h ('k') | components/mus/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/bitmap_uploader/bitmap_uploader.cc
diff --git a/components/bitmap_uploader/bitmap_uploader.cc b/components/bitmap_uploader/bitmap_uploader.cc
index 7dec82c6746e1f1a3620fb925a8ec1a3b44a9380..b52aa8a69c8aa3debb5277d95d0e46c64163d727 100644
--- a/components/bitmap_uploader/bitmap_uploader.cc
+++ b/components/bitmap_uploader/bitmap_uploader.cc
@@ -14,7 +14,6 @@
#include "components/mus/public/cpp/surfaces/surfaces_utils.h"
#include "components/mus/public/cpp/window.h"
#include "components/mus/public/cpp/window_surface.h"
-#include "services/shell/public/cpp/connector.h"
namespace bitmap_uploader {
namespace {
@@ -43,13 +42,9 @@ void BitmapUploader::Init(shell::Connector* connector) {
surface_->BindToThread();
surface_->set_client(this);
- connector->ConnectToInterface("mojo:mus", &gpu_service_);
- mus::mojom::CommandBufferPtr command_buffer_ptr;
- gpu_service_->CreateOffscreenGLES2Context(GetProxy(&command_buffer_ptr));
- gles2_context_.reset(new mus::GLES2Context(std::vector<int32_t>(),
- std::move(command_buffer_ptr)));
- bool initialized = gles2_context_->Initialize();
- DCHECK(initialized);
+ gles2_context_ = mus::GLES2Context::CreateOffscreenContext(
+ std::vector<int32_t>(), connector);
+ DCHECK(gles2_context_);
}
// Sets the color which is RGBA.
@@ -75,11 +70,6 @@ void BitmapUploader::SetBitmap(int width,
}
void BitmapUploader::Upload() {
- // If the |gpu_service_| has errored than we won't get far. Do nothing,
- // assuming we are in shutdown.
- if (gpu_service_.encountered_error())
- return;
-
const gfx::Rect bounds(window_->bounds());
mus::mojom::PassPtr pass = mojo::CreateDefaultPass(1, bounds);
mus::mojom::CompositorFramePtr frame = mus::mojom::CompositorFrame::New();
« no previous file with comments | « components/bitmap_uploader/bitmap_uploader.h ('k') | components/mus/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698