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

Side by Side Diff: components/display_compositor/buffer_queue_unittest.cc

Issue 2298353002: gfx: Use unsigned strides for gpu memory buffers. (Closed)
Patch Set: . Created 4 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/display_compositor/buffer_queue.h" 5 #include "components/display_compositor/buffer_queue.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 23 matching lines...) Expand all
34 : set_color_space_count_(set_color_space_count) {} 34 : set_color_space_count_(set_color_space_count) {}
35 35
36 // Overridden from gfx::GpuMemoryBuffer: 36 // Overridden from gfx::GpuMemoryBuffer:
37 bool Map() override { return false; } 37 bool Map() override { return false; }
38 void* memory(size_t plane) override { return nullptr; } 38 void* memory(size_t plane) override { return nullptr; }
39 void Unmap() override {} 39 void Unmap() override {}
40 gfx::Size GetSize() const override { return gfx::Size(); } 40 gfx::Size GetSize() const override { return gfx::Size(); }
41 gfx::BufferFormat GetFormat() const override { 41 gfx::BufferFormat GetFormat() const override {
42 return gfx::BufferFormat::BGRX_8888; 42 return gfx::BufferFormat::BGRX_8888;
43 } 43 }
44 int stride(size_t plane) const override { return 0; } 44 uint32_t stride(size_t plane) const override { return 0u; }
45 gfx::GpuMemoryBufferId GetId() const override { 45 gfx::GpuMemoryBufferId GetId() const override {
46 return gfx::GpuMemoryBufferId(0); 46 return gfx::GpuMemoryBufferId(0);
47 } 47 }
48 void SetColorSpaceForScanout(const gfx::ColorSpace& color_space) override { 48 void SetColorSpaceForScanout(const gfx::ColorSpace& color_space) override {
49 *set_color_space_count_ += 1; 49 *set_color_space_count_ += 1;
50 } 50 }
51 gfx::GpuMemoryBufferHandle GetHandle() const override { 51 gfx::GpuMemoryBufferHandle GetHandle() const override {
52 return gfx::GpuMemoryBufferHandle(); 52 return gfx::GpuMemoryBufferHandle();
53 } 53 }
54 ClientBuffer AsClientBuffer() override { 54 ClientBuffer AsClientBuffer() override {
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 testing::Mock::VerifyAndClearExpectations(mock_output_surface_); 671 testing::Mock::VerifyAndClearExpectations(mock_output_surface_);
672 EXPECT_CALL(*mock_output_surface_, 672 EXPECT_CALL(*mock_output_surface_,
673 CopyBufferDamage(target_texture, source_texture, small_damage, _)) 673 CopyBufferDamage(target_texture, source_texture, small_damage, _))
674 .Times(1); 674 .Times(1);
675 output_surface_->SwapBuffers(small_damage); 675 output_surface_->SwapBuffers(small_damage);
676 testing::Mock::VerifyAndClearExpectations(mock_output_surface_); 676 testing::Mock::VerifyAndClearExpectations(mock_output_surface_);
677 } 677 }
678 678
679 } // namespace 679 } // namespace
680 } // namespace display_compositor 680 } // namespace display_compositor
OLDNEW
« no previous file with comments | « cc/test/test_gpu_memory_buffer_manager.cc ('k') | content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698