This source file includes following definitions.
- data_size_
- AddUpload
- GetStats
#include "gpu/command_buffer/service/async_pixel_transfer_delegate.h"
namespace gpu {
AsyncMemoryParams::AsyncMemoryParams(scoped_refptr<Buffer> buffer,
uint32 data_offset,
uint32 data_size)
: buffer_(buffer), data_offset_(data_offset), data_size_(data_size) {
DCHECK(buffer_);
DCHECK(buffer_->memory());
}
AsyncMemoryParams::~AsyncMemoryParams() {
}
AsyncPixelTransferUploadStats::AsyncPixelTransferUploadStats()
: texture_upload_count_(0) {}
AsyncPixelTransferUploadStats::~AsyncPixelTransferUploadStats() {}
void AsyncPixelTransferUploadStats::AddUpload(base::TimeDelta transfer_time) {
base::AutoLock scoped_lock(lock_);
texture_upload_count_++;
total_texture_upload_time_ += transfer_time;
}
int AsyncPixelTransferUploadStats::GetStats(
base::TimeDelta* total_texture_upload_time) {
base::AutoLock scoped_lock(lock_);
if (total_texture_upload_time)
*total_texture_upload_time = total_texture_upload_time_;
return texture_upload_count_;
}
AsyncPixelTransferDelegate::AsyncPixelTransferDelegate() {}
AsyncPixelTransferDelegate::~AsyncPixelTransferDelegate() {}
}