diff options
author | reveman <reveman@chromium.org> | 2015-10-09 06:09:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-09 13:10:18 +0000 |
commit | bb2bf660a2c6563cf28e5e4d7e3e9ccb0740d284 (patch) | |
tree | 902755986f433645934470c012aa11f3c8ca6bd5 /gpu | |
parent | b4a8a4f9fa947a27f8c32cd8b079e15084dc4aeb (diff) | |
download | chromium_src-bb2bf660a2c6563cf28e5e4d7e3e9ccb0740d284.zip chromium_src-bb2bf660a2c6563cf28e5e4d7e3e9ccb0740d284.tar.gz chromium_src-bb2bf660a2c6563cf28e5e4d7e3e9ccb0740d284.tar.bz2 |
ui: Add GetSize() function to gfx::GpuMemoryBuffer API.
This removes the IsMapped() function from the API as that was
never useful and instead adds a GetSize() function that makes
sense to have in addition to the existing GetFormat() function
and will be used by a follow up patch.
BUG=538325
TBR=dalecurtis@chromium.org, sky@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1391963003
Cr-Commit-Position: refs/heads/master@{#353276}
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/tests/gl_manager.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc index 8d38fdb..b0414cd 100644 --- a/gpu/command_buffer/tests/gl_manager.cc +++ b/gpu/command_buffer/tests/gl_manager.cc @@ -49,7 +49,7 @@ class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { GpuMemoryBufferImpl(base::RefCountedBytes* bytes, const gfx::Size& size, gfx::BufferFormat format) - : bytes_(bytes), size_(size), format_(format), mapped_(false) {} + : bytes_(bytes), size_(size), format_(format) {} static GpuMemoryBufferImpl* FromClientBuffer(ClientBuffer buffer) { return reinterpret_cast<GpuMemoryBufferImpl*>(buffer); @@ -65,11 +65,10 @@ class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { gfx::RowSizeForBufferFormat(size_.width(), format_, i) * (size_.height() / gfx::SubsamplingFactorForBufferFormat(format_, i)); } - mapped_ = true; return true; } - void Unmap() override { mapped_ = false; } - bool IsMapped() const override { return mapped_; } + void Unmap() override {} + gfx::Size GetSize() const override { return size_; } gfx::BufferFormat GetFormat() const override { return format_; } void GetStride(int* stride) const override { size_t num_planes = gfx::NumberOfPlanesForBufferFormat(format_); @@ -94,7 +93,6 @@ class GpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { scoped_refptr<base::RefCountedBytes> bytes_; const gfx::Size size_; gfx::BufferFormat format_; - bool mapped_; }; } // namespace |