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

Unified Diff: components/bitmap_uploader/bitmap_uploader.cc

Issue 1864543004: Make sure BitmapUploader Returns Resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Scott's comment Created 4 years, 8 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/public/cpp/window_surface_client.h » ('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 d65474277564f8df571bf10aaec56b4ec8fb57f1..2437c4c10cbec12d01970ea063a83710ac3be433 100644
--- a/components/bitmap_uploader/bitmap_uploader.cc
+++ b/components/bitmap_uploader/bitmap_uploader.cc
@@ -39,8 +39,7 @@ BitmapUploader::BitmapUploader(mus::Window* window)
height_(0),
format_(BGRA),
next_resource_id_(1u),
- id_namespace_(0u),
- surface_client_binding_(this) {}
+ id_namespace_(0u) {}
BitmapUploader::~BitmapUploader() {
MojoGLES2DestroyContext(gles2_context_);
@@ -49,6 +48,7 @@ BitmapUploader::~BitmapUploader() {
void BitmapUploader::Init(mojo::Connector* connector) {
surface_ = window_->RequestSurface(mus::mojom::SurfaceType::DEFAULT);
surface_->BindToThread();
+ surface_->set_client(this);
connector->ConnectToInterface("mojo:mus", &gpu_service_);
mus::mojom::CommandBufferPtr gles2_client;
@@ -231,7 +231,8 @@ void BitmapUploader::SetIdNamespace(uint32_t id_namespace) {
Upload();
}
-void BitmapUploader::ReturnResources(
+void BitmapUploader::OnResourcesReturned(
+ mus::WindowSurface* surface,
mojo::Array<mus::mojom::ReturnedResourcePtr> resources) {
MojoGLES2MakeCurrent(gles2_context_);
// TODO(jamesr): Recycle.
« no previous file with comments | « components/bitmap_uploader/bitmap_uploader.h ('k') | components/mus/public/cpp/window_surface_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698