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

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

Issue 2399983003: cc: Make OutputSurface::Reshape abstract (Closed)
Patch Set: reshapeabstract: . Created 4 years, 2 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/output_surface.cc ('k') | cc/output/overlay_unittest.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/output_surface.h" 5 #include "cc/output/output_surface.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/output/output_surface_frame.h" 10 #include "cc/output/output_surface_frame.h"
(...skipping 13 matching lines...) Expand all
24 scoped_refptr<TestContextProvider> context_provider) 24 scoped_refptr<TestContextProvider> context_provider)
25 : OutputSurface(std::move(context_provider)) {} 25 : OutputSurface(std::move(context_provider)) {}
26 26
27 explicit TestOutputSurface( 27 explicit TestOutputSurface(
28 std::unique_ptr<SoftwareOutputDevice> software_device) 28 std::unique_ptr<SoftwareOutputDevice> software_device)
29 : OutputSurface(std::move(software_device)) {} 29 : OutputSurface(std::move(software_device)) {}
30 30
31 void EnsureBackbuffer() override {} 31 void EnsureBackbuffer() override {}
32 void DiscardBackbuffer() override {} 32 void DiscardBackbuffer() override {}
33 void BindFramebuffer() override {} 33 void BindFramebuffer() override {}
34 void Reshape(const gfx::Size& size,
35 float device_scale_factor,
36 const gfx::ColorSpace& color_space,
37 bool has_alpha) override {}
34 void SwapBuffers(OutputSurfaceFrame frame) override { 38 void SwapBuffers(OutputSurfaceFrame frame) override {
35 client_->DidSwapBuffersComplete(); 39 client_->DidSwapBuffersComplete();
36 } 40 }
37 uint32_t GetFramebufferCopyTextureFormat() override { 41 uint32_t GetFramebufferCopyTextureFormat() override {
38 // TestContextProvider has no real framebuffer, just use RGB. 42 // TestContextProvider has no real framebuffer, just use RGB.
39 return GL_RGB; 43 return GL_RGB;
40 } 44 }
41 OverlayCandidateValidator* GetOverlayCandidateValidator() const override { 45 OverlayCandidateValidator* GetOverlayCandidateValidator() const override {
42 return nullptr; 46 return nullptr;
43 } 47 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 context_provider->UnboundTestContext3d()->set_context_lost(true); 113 context_provider->UnboundTestContext3d()->set_context_lost(true);
110 114
111 TestOutputSurface output_surface(context_provider); 115 TestOutputSurface output_surface(context_provider);
112 116
113 FakeOutputSurfaceClient client; 117 FakeOutputSurfaceClient client;
114 EXPECT_FALSE(output_surface.BindToClient(&client)); 118 EXPECT_FALSE(output_surface.BindToClient(&client));
115 } 119 }
116 120
117 } // namespace 121 } // namespace
118 } // namespace cc 122 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/output_surface.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698