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

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

Issue 2403373002: cc: Clean up OutputSurfaceClient. (Closed)
Patch Set: osclient: rebase 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_client.h ('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 18 matching lines...) Expand all
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, 34 void Reshape(const gfx::Size& size,
35 float device_scale_factor, 35 float device_scale_factor,
36 const gfx::ColorSpace& color_space, 36 const gfx::ColorSpace& color_space,
37 bool has_alpha) override {} 37 bool has_alpha) override {}
38 void SwapBuffers(OutputSurfaceFrame frame) override { 38 void SwapBuffers(OutputSurfaceFrame frame) override {
39 client_->DidSwapBuffersComplete(); 39 client_->DidReceiveSwapBuffersAck();
40 } 40 }
41 uint32_t GetFramebufferCopyTextureFormat() override { 41 uint32_t GetFramebufferCopyTextureFormat() override {
42 // TestContextProvider has no real framebuffer, just use RGB. 42 // TestContextProvider has no real framebuffer, just use RGB.
43 return GL_RGB; 43 return GL_RGB;
44 } 44 }
45 OverlayCandidateValidator* GetOverlayCandidateValidator() const override { 45 OverlayCandidateValidator* GetOverlayCandidateValidator() const override {
46 return nullptr; 46 return nullptr;
47 } 47 }
48 bool IsDisplayedAsOverlayPlane() const override { return false; } 48 bool IsDisplayedAsOverlayPlane() const override { return false; }
49 unsigned GetOverlayTextureId() const override { return 0; } 49 unsigned GetOverlayTextureId() const override { return 0; }
50 bool SurfaceIsSuspendForRecycle() const override { return false; } 50 bool SurfaceIsSuspendForRecycle() const override { return false; }
51 bool HasExternalStencilTest() const override { return false; } 51 bool HasExternalStencilTest() const override { return false; }
52 void ApplyExternalStencil() override {} 52 void ApplyExternalStencil() override {}
53 53
54 void OnSwapBuffersCompleteForTesting() { client_->DidSwapBuffersComplete(); } 54 void OnSwapBuffersCompleteForTesting() {
55 client_->DidReceiveSwapBuffersAck();
56 }
55 57
56 protected: 58 protected:
57 }; 59 };
58 60
59 class TestSoftwareOutputDevice : public SoftwareOutputDevice { 61 class TestSoftwareOutputDevice : public SoftwareOutputDevice {
60 public: 62 public:
61 TestSoftwareOutputDevice(); 63 TestSoftwareOutputDevice();
62 ~TestSoftwareOutputDevice() override; 64 ~TestSoftwareOutputDevice() override;
63 65
64 // Overriden from cc:SoftwareOutputDevice 66 // Overriden from cc:SoftwareOutputDevice
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 context_provider->UnboundTestContext3d()->set_context_lost(true); 115 context_provider->UnboundTestContext3d()->set_context_lost(true);
114 116
115 TestOutputSurface output_surface(context_provider); 117 TestOutputSurface output_surface(context_provider);
116 118
117 FakeOutputSurfaceClient client; 119 FakeOutputSurfaceClient client;
118 EXPECT_FALSE(output_surface.BindToClient(&client)); 120 EXPECT_FALSE(output_surface.BindToClient(&client));
119 } 121 }
120 122
121 } // namespace 123 } // namespace
122 } // namespace cc 124 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/output_surface_client.h ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698