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

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

Issue 2873243002: Move components/display_compositor to components/viz/display_compositor (Closed)
Patch Set: Rebase Created 3 years, 7 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/viz/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>
11 #include <utility> 11 #include <utility>
12 12
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "cc/test/test_context_provider.h" 14 #include "cc/test/test_context_provider.h"
15 #include "cc/test/test_gpu_memory_buffer_manager.h" 15 #include "cc/test/test_gpu_memory_buffer_manager.h"
16 #include "cc/test/test_web_graphics_context_3d.h" 16 #include "cc/test/test_web_graphics_context_3d.h"
17 #include "components/display_compositor/gl_helper.h" 17 #include "components/viz/display_compositor/gl_helper.h"
18 #include "gpu/GLES2/gl2extchromium.h" 18 #include "gpu/GLES2/gl2extchromium.h"
19 #include "testing/gmock/include/gmock/gmock.h" 19 #include "testing/gmock/include/gmock/gmock.h"
20 #include "testing/gtest/include/gtest/gtest.h" 20 #include "testing/gtest/include/gtest/gtest.h"
21 #include "third_party/khronos/GLES2/gl2ext.h" 21 #include "third_party/khronos/GLES2/gl2ext.h"
22 #include "ui/display/types/display_snapshot.h" 22 #include "ui/display/types/display_snapshot.h"
23 23
24 using ::testing::_; 24 using ::testing::_;
25 using ::testing::Expectation; 25 using ::testing::Expectation;
26 using ::testing::Ne; 26 using ::testing::Ne;
27 using ::testing::Return; 27 using ::testing::Return;
28 28
29 namespace display_compositor { 29 namespace viz {
30 30
31 class StubGpuMemoryBufferImpl : public gfx::GpuMemoryBuffer { 31 class StubGpuMemoryBufferImpl : public gfx::GpuMemoryBuffer {
32 public: 32 public:
33 StubGpuMemoryBufferImpl(size_t* set_color_space_count) 33 explicit StubGpuMemoryBufferImpl(size_t* set_color_space_count)
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 }
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 target_texture = current_frame()->texture; 670 target_texture = current_frame()->texture;
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 viz
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698