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

Side by Side Diff: content/common/gpu/client/gpu_memory_buffer_impl.cc

Issue 685983005: gpu: Associate all GpuMemoryBuffers with unique IDs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more ozone build fix Created 6 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/common/gpu/client/gpu_memory_buffer_impl.h" 5 #include "content/common/gpu/client/gpu_memory_buffer_impl.h"
6 6
7 #include "ui/gl/gl_bindings.h" 7 #include "ui/gl/gl_bindings.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 GpuMemoryBufferImpl::GpuMemoryBufferImpl(const gfx::Size& size, 11 GpuMemoryBufferImpl::GpuMemoryBufferImpl(gfx::GpuMemoryBufferId id,
12 const gfx::Size& size,
12 Format format, 13 Format format,
13 const DestructionCallback& callback) 14 const DestructionCallback& callback)
14 : size_(size), 15 : id_(id),
16 size_(size),
15 format_(format), 17 format_(format),
16 callback_(callback), 18 callback_(callback),
17 mapped_(false), 19 mapped_(false),
18 destruction_sync_point_(0) { 20 destruction_sync_point_(0) {
19 } 21 }
20 22
21 GpuMemoryBufferImpl::~GpuMemoryBufferImpl() { 23 GpuMemoryBufferImpl::~GpuMemoryBufferImpl() {
22 callback_.Run(destruction_sync_point_); 24 callback_.Run(destruction_sync_point_);
23 } 25 }
24 26
(...skipping 22 matching lines...) Expand all
47 49
48 bool GpuMemoryBufferImpl::IsMapped() const { 50 bool GpuMemoryBufferImpl::IsMapped() const {
49 return mapped_; 51 return mapped_;
50 } 52 }
51 53
52 ClientBuffer GpuMemoryBufferImpl::AsClientBuffer() { 54 ClientBuffer GpuMemoryBufferImpl::AsClientBuffer() {
53 return reinterpret_cast<ClientBuffer>(this); 55 return reinterpret_cast<ClientBuffer>(this);
54 } 56 }
55 57
56 } // namespace content 58 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl.h ('k') | content/common/gpu/client/gpu_memory_buffer_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698