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

Unified Diff: content/common/host_shared_bitmap_manager.cc

Issue 1875463002: Remove unused fields from //content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scythe-root
Patch Set: Fixed Ozone build. 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
Index: content/common/host_shared_bitmap_manager.cc
diff --git a/content/common/host_shared_bitmap_manager.cc b/content/common/host_shared_bitmap_manager.cc
index 2533cf16835806ccb43533dcc2c90f8fdbd03b9d..f6bb519807b0643fbe3731279a9f94ffc44d4010 100644
--- a/content/common/host_shared_bitmap_manager.cc
+++ b/content/common/host_shared_bitmap_manager.cc
@@ -22,11 +22,7 @@ namespace content {
class BitmapData : public base::RefCountedThreadSafe<BitmapData> {
public:
- BitmapData(base::ProcessHandle process_handle,
- size_t buffer_size)
- : process_handle(process_handle),
- buffer_size(buffer_size) {}
- base::ProcessHandle process_handle;
+ BitmapData(size_t buffer_size) : buffer_size(buffer_size) {}
ncarter (slow) 2016/04/14 17:37:36 Needs 'explicit'
Łukasz Anforowicz 2016/04/14 19:34:48 Done.
std::unique_ptr<base::SharedMemory> memory;
std::unique_ptr<uint8_t[]> pixels;
size_t buffer_size;
@@ -90,10 +86,8 @@ void HostSharedBitmapManagerClient::AllocateSharedBitmapForChild(
void HostSharedBitmapManagerClient::ChildAllocatedSharedBitmap(
size_t buffer_size,
const base::SharedMemoryHandle& handle,
- base::ProcessHandle process_handle,
const cc::SharedBitmapId& id) {
- if (manager_->ChildAllocatedSharedBitmap(buffer_size, handle, process_handle,
- id)) {
+ if (manager_->ChildAllocatedSharedBitmap(buffer_size, handle, id)) {
base::AutoLock lock(lock_);
owned_bitmaps_.insert(id);
}
@@ -124,9 +118,7 @@ std::unique_ptr<cc::SharedBitmap> HostSharedBitmapManager::AllocateSharedBitmap(
if (!cc::SharedBitmap::SizeInBytes(size, &bitmap_size))
return std::unique_ptr<cc::SharedBitmap>();
- scoped_refptr<BitmapData> data(
- new BitmapData(base::GetCurrentProcessHandle(),
- bitmap_size));
+ scoped_refptr<BitmapData> data(new BitmapData(bitmap_size));
// Bitmaps allocated in host don't need to be shared to other processes, so
// allocate them with new instead.
data->pixels = std::unique_ptr<uint8_t[]>(new uint8_t[bitmap_size]);
@@ -195,13 +187,11 @@ bool HostSharedBitmapManager::OnMemoryDump(
bool HostSharedBitmapManager::ChildAllocatedSharedBitmap(
size_t buffer_size,
const base::SharedMemoryHandle& handle,
- base::ProcessHandle process_handle,
const cc::SharedBitmapId& id) {
base::AutoLock lock(lock_);
if (handle_map_.find(id) != handle_map_.end())
return false;
- scoped_refptr<BitmapData> data(
- new BitmapData(process_handle, buffer_size));
+ scoped_refptr<BitmapData> data(new BitmapData(buffer_size));
handle_map_[id] = data;
data->memory = base::WrapUnique(new base::SharedMemory(handle, false));
@@ -227,8 +217,7 @@ void HostSharedBitmapManager::AllocateSharedBitmapForChild(
return;
}
- scoped_refptr<BitmapData> data(
- new BitmapData(process_handle, buffer_size));
+ scoped_refptr<BitmapData> data(new BitmapData(buffer_size));
data->memory = std::move(shared_memory);
handle_map_[id] = data;

Powered by Google App Engine
This is Rietveld 408576698