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

Side by Side Diff: cc/test/test_delegating_output_surface.h

Issue 2167713002: cc: Delete SurfaceDrawStatus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Scott's comments Created 4 years, 5 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/surfaces/surface_factory_unittest.cc ('k') | cc/test/test_delegating_output_surface.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef CC_TEST_TEST_DELEGATING_OUTPUT_SURFACE_H_ 5 #ifndef CC_TEST_TEST_DELEGATING_OUTPUT_SURFACE_H_
6 #define CC_TEST_TEST_DELEGATING_OUTPUT_SURFACE_H_ 6 #define CC_TEST_TEST_DELEGATING_OUTPUT_SURFACE_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "cc/output/output_surface.h" 9 #include "cc/output/output_surface.h"
10 #include "cc/output/renderer_settings.h" 10 #include "cc/output/renderer_settings.h"
(...skipping 24 matching lines...) Expand all
35 void SwapBuffers(CompositorFrame frame) override; 35 void SwapBuffers(CompositorFrame frame) override;
36 void ForceReclaimResources() override; 36 void ForceReclaimResources() override;
37 void BindFramebuffer() override; 37 void BindFramebuffer() override;
38 uint32_t GetFramebufferCopyTextureFormat() override; 38 uint32_t GetFramebufferCopyTextureFormat() override;
39 39
40 // SurfaceFactoryClient implementation. 40 // SurfaceFactoryClient implementation.
41 void ReturnResources(const ReturnedResourceArray& resources) override; 41 void ReturnResources(const ReturnedResourceArray& resources) override;
42 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override; 42 void SetBeginFrameSource(BeginFrameSource* begin_frame_source) override;
43 43
44 private: 44 private:
45 void DrawCallback(SurfaceDrawStatus); 45 void DrawCallback();
46 46
47 class PixelTestDisplayClient : public DisplayClient { 47 class PixelTestDisplayClient : public DisplayClient {
48 void DisplayOutputSurfaceLost() override {} 48 void DisplayOutputSurfaceLost() override {}
49 void DisplaySetMemoryPolicy(const ManagedMemoryPolicy& policy) override {} 49 void DisplaySetMemoryPolicy(const ManagedMemoryPolicy& policy) override {}
50 }; 50 };
51 51
52 // TODO(danakj): These don't to be stored in unique_ptrs when OutputSurface 52 // TODO(danakj): These don't to be stored in unique_ptrs when OutputSurface
53 // is owned/destroyed on the compositor thread. 53 // is owned/destroyed on the compositor thread.
54 std::unique_ptr<SurfaceManager> surface_manager_; 54 std::unique_ptr<SurfaceManager> surface_manager_;
55 std::unique_ptr<SurfaceIdAllocator> surface_id_allocator_; 55 std::unique_ptr<SurfaceIdAllocator> surface_id_allocator_;
56 SurfaceId delegated_surface_id_; 56 SurfaceId delegated_surface_id_;
57 57
58 // Uses surface_manager_. 58 // Uses surface_manager_.
59 std::unique_ptr<SurfaceFactory> surface_factory_; 59 std::unique_ptr<SurfaceFactory> surface_factory_;
60 60
61 PixelTestDisplayClient display_client_; 61 PixelTestDisplayClient display_client_;
62 // Uses surface_manager_. 62 // Uses surface_manager_.
63 std::unique_ptr<Display> display_; 63 std::unique_ptr<Display> display_;
64 64
65 base::WeakPtrFactory<TestDelegatingOutputSurface> weak_ptrs_; 65 base::WeakPtrFactory<TestDelegatingOutputSurface> weak_ptrs_;
66 }; 66 };
67 67
68 } // namespace cc 68 } // namespace cc
69 69
70 #endif // CC_TEST_TEST_DELEGATING_OUTPUT_SURFACE_H_ 70 #endif // CC_TEST_TEST_DELEGATING_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/surfaces/surface_factory_unittest.cc ('k') | cc/test/test_delegating_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698