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

Side by Side Diff: gpu/command_buffer/service/async_pixel_transfer_delegate.cc

Issue 16175005: GPU: Replace AsyncPixelTransferState with AsyncPixelTransferDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "gpu/command_buffer/service/async_pixel_transfer_delegate.h" 5 #include "gpu/command_buffer/service/async_pixel_transfer_delegate.h"
6 6
7 #include "base/memory/shared_memory.h" 7 #include "base/memory/shared_memory.h"
8 #include "gpu/command_buffer/service/safe_shared_memory_pool.h" 8 #include "gpu/command_buffer/service/safe_shared_memory_pool.h"
9 9
10 namespace gpu { 10 namespace gpu {
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 int AsyncPixelTransferUploadStats::GetStats( 39 int AsyncPixelTransferUploadStats::GetStats(
40 base::TimeDelta* total_texture_upload_time) { 40 base::TimeDelta* total_texture_upload_time) {
41 base::AutoLock scoped_lock(lock_); 41 base::AutoLock scoped_lock(lock_);
42 if (total_texture_upload_time) 42 if (total_texture_upload_time)
43 *total_texture_upload_time = total_texture_upload_time_; 43 *total_texture_upload_time = total_texture_upload_time_;
44 return texture_upload_count_; 44 return texture_upload_count_;
45 } 45 }
46 46
47 AsyncPixelTransferState::AsyncPixelTransferState(){}
48
49 AsyncPixelTransferState::~AsyncPixelTransferState(){}
50
51 AsyncPixelTransferDelegate::AsyncPixelTransferDelegate(){} 47 AsyncPixelTransferDelegate::AsyncPixelTransferDelegate(){}
52 48
53 AsyncPixelTransferDelegate::~AsyncPixelTransferDelegate(){} 49 AsyncPixelTransferDelegate::~AsyncPixelTransferDelegate(){}
54 50
55 // static 51 // static
56 void* AsyncPixelTransferDelegate::GetAddress( 52 void* AsyncPixelTransferDelegate::GetAddress(
57 const AsyncMemoryParams& mem_params) { 53 const AsyncMemoryParams& mem_params) {
58 return GetAddressImpl(mem_params.shared_memory, 54 return GetAddressImpl(mem_params.shared_memory,
59 mem_params.shm_size, 55 mem_params.shm_size,
60 mem_params.shm_data_offset, 56 mem_params.shm_data_offset,
61 mem_params.shm_data_size); 57 mem_params.shm_data_size);
62 } 58 }
63 59
64 // static 60 // static
65 void* AsyncPixelTransferDelegate::GetAddress( 61 void* AsyncPixelTransferDelegate::GetAddress(
66 ScopedSafeSharedMemory* safe_shared_memory, 62 ScopedSafeSharedMemory* safe_shared_memory,
67 const AsyncMemoryParams& mem_params) { 63 const AsyncMemoryParams& mem_params) {
68 return GetAddressImpl(safe_shared_memory->shared_memory(), 64 return GetAddressImpl(safe_shared_memory->shared_memory(),
69 mem_params.shm_size, 65 mem_params.shm_size,
70 mem_params.shm_data_offset, 66 mem_params.shm_data_offset,
71 mem_params.shm_data_size); 67 mem_params.shm_data_size);
72 } 68 }
73 69
74 } // namespace gpu 70 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698