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

Side by Side Diff: cc/output/renderer_unittest.cc

Issue 1803863003: cc: Remove some unnecessary const scoped_refptr&. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/output/texture_mailbox_deleter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/output/delegating_renderer.h" 5 #include "cc/output/delegating_renderer.h"
6 #include "cc/output/gl_renderer.h" 6 #include "cc/output/gl_renderer.h"
7 #include "cc/output/output_surface.h" 7 #include "cc/output/output_surface.h"
8 #include "cc/test/fake_output_surface_client.h" 8 #include "cc/test/fake_output_surface_client.h"
9 #include "cc/test/fake_renderer_client.h" 9 #include "cc/test/fake_renderer_client.h"
10 #include "cc/test/fake_resource_provider.h" 10 #include "cc/test/fake_resource_provider.h"
11 #include "cc/test/test_context_provider.h" 11 #include "cc/test/test_context_provider.h"
12 #include "cc/test/test_web_graphics_context_3d.h" 12 #include "cc/test/test_web_graphics_context_3d.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace cc { 16 namespace cc {
17 namespace { 17 namespace {
18 18
19 class TestOutputSurface : public OutputSurface { 19 class TestOutputSurface : public OutputSurface {
20 public: 20 public:
21 explicit TestOutputSurface( 21 explicit TestOutputSurface(scoped_refptr<ContextProvider> context_provider);
22 const scoped_refptr<ContextProvider>& context_provider);
23 ~TestOutputSurface() override; 22 ~TestOutputSurface() override;
24 23
25 // OutputSurface implementation 24 // OutputSurface implementation
26 void SwapBuffers(CompositorFrame* frame) override; 25 void SwapBuffers(CompositorFrame* frame) override;
27 }; 26 };
28 27
29 TestOutputSurface::TestOutputSurface( 28 TestOutputSurface::TestOutputSurface(
30 const scoped_refptr<ContextProvider>& context_provider) 29 scoped_refptr<ContextProvider> context_provider)
31 : OutputSurface(context_provider) { 30 : OutputSurface(std::move(context_provider)) {}
32 }
33 31
34 TestOutputSurface::~TestOutputSurface() { 32 TestOutputSurface::~TestOutputSurface() {
35 } 33 }
36 34
37 void TestOutputSurface::SwapBuffers(CompositorFrame* frame) { 35 void TestOutputSurface::SwapBuffers(CompositorFrame* frame) {
38 client_->DidSwapBuffers(); 36 client_->DidSwapBuffers();
39 client_->DidSwapBuffersComplete(); 37 client_->DidSwapBuffersComplete();
40 } 38 }
41 39
42 class MockContextProvider : public TestContextProvider { 40 class MockContextProvider : public TestContextProvider {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 EXPECT_CALL(*(this->context_provider_.get()), DeleteCachedResources()) 105 EXPECT_CALL(*(this->context_provider_.get()), DeleteCachedResources())
108 .Times(1); 106 .Times(1);
109 107
110 EXPECT_TRUE(this->renderer_->visible()); 108 EXPECT_TRUE(this->renderer_->visible());
111 this->renderer_->SetVisible(false); 109 this->renderer_->SetVisible(false);
112 EXPECT_FALSE(this->renderer_->visible()); 110 EXPECT_FALSE(this->renderer_->visible());
113 } 111 }
114 112
115 } // namespace 113 } // namespace
116 } // namespace cc 114 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/renderer_pixeltest.cc ('k') | cc/output/texture_mailbox_deleter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698