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

Side by Side Diff: components/bitmap_uploader/bitmap_uploader.cc

Issue 1679573002: Move shell interfaces into the shell.mojom namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
Patch Set: . Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/bitmap_uploader/bitmap_uploader.h" 5 #include "components/bitmap_uploader/bitmap_uploader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 height_(0), 44 height_(0),
45 format_(BGRA), 45 format_(BGRA),
46 next_resource_id_(1u), 46 next_resource_id_(1u),
47 id_namespace_(0u), 47 id_namespace_(0u),
48 surface_client_binding_(this) {} 48 surface_client_binding_(this) {}
49 49
50 BitmapUploader::~BitmapUploader() { 50 BitmapUploader::~BitmapUploader() {
51 MojoGLES2DestroyContext(gles2_context_); 51 MojoGLES2DestroyContext(gles2_context_);
52 } 52 }
53 53
54 void BitmapUploader::Init(mojo::Shell* shell) { 54 void BitmapUploader::Init(mojo::shell::mojom::Shell* shell) {
55 surface_ = window_->RequestSurface(mus::mojom::SurfaceType::DEFAULT); 55 surface_ = window_->RequestSurface(mus::mojom::SurfaceType::DEFAULT);
56 surface_->BindToThread(); 56 surface_->BindToThread();
57 57
58 mojo::ServiceProviderPtr gpu_service_provider; 58 mojo::ServiceProviderPtr gpu_service_provider;
59 mojo::URLRequestPtr request2(mojo::URLRequest::New()); 59 mojo::URLRequestPtr request2(mojo::URLRequest::New());
60 request2->url = mojo::String::From("mojo:mus"); 60 request2->url = mojo::String::From("mojo:mus");
61 shell->ConnectToApplication(std::move(request2), 61 shell->ConnectToApplication(std::move(request2),
62 mojo::GetProxy(&gpu_service_provider), nullptr, 62 mojo::GetProxy(&gpu_service_provider), nullptr,
63 mojo::CreatePermissiveCapabilityFilter(), 63 mojo::CreatePermissiveCapabilityFilter(),
64 base::Bind(&OnGotRemoteIDs)); 64 base::Bind(&OnGotRemoteIDs));
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 glWaitSyncTokenCHROMIUM( 262 glWaitSyncTokenCHROMIUM(
263 resource->sync_token.To<gpu::SyncToken>().GetConstData()); 263 resource->sync_token.To<gpu::SyncToken>().GetConstData());
264 uint32_t texture_id = resource_to_texture_id_map_[resource->id]; 264 uint32_t texture_id = resource_to_texture_id_map_[resource->id];
265 DCHECK_NE(0u, texture_id); 265 DCHECK_NE(0u, texture_id);
266 resource_to_texture_id_map_.erase(resource->id); 266 resource_to_texture_id_map_.erase(resource->id);
267 glDeleteTextures(1, &texture_id); 267 glDeleteTextures(1, &texture_id);
268 } 268 }
269 } 269 }
270 270
271 } // namespace bitmap_uploader 271 } // namespace bitmap_uploader
OLDNEW
« no previous file with comments | « components/bitmap_uploader/bitmap_uploader.h ('k') | components/font_service/public/cpp/font_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698