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

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

Issue 2409923002: cc: Rename SwapBuffers on CompositorFrameSink to SubmitCompositorFrame (Closed)
Patch Set: swap-to-submit: 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/test/fake_channel_impl.h ('k') | cc/test/fake_compositor_frame_sink.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_FAKE_COMPOSITOR_FRAME_SINK_H_ 5 #ifndef CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_H_
6 #define CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_H_ 6 #define CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 return base::WrapUnique(new FakeCompositorFrameSink( 42 return base::WrapUnique(new FakeCompositorFrameSink(
43 TestContextProvider::Create(std::move(context)), 43 TestContextProvider::Create(std::move(context)),
44 TestContextProvider::CreateWorker())); 44 TestContextProvider::CreateWorker()));
45 } 45 }
46 46
47 static std::unique_ptr<FakeCompositorFrameSink> CreateSoftware() { 47 static std::unique_ptr<FakeCompositorFrameSink> CreateSoftware() {
48 return base::WrapUnique(new FakeCompositorFrameSink(nullptr, nullptr)); 48 return base::WrapUnique(new FakeCompositorFrameSink(nullptr, nullptr));
49 } 49 }
50 50
51 // CompositorFrameSink implementation. 51 // CompositorFrameSink implementation.
52 void SwapBuffers(CompositorFrame frame) override; 52 void SubmitCompositorFrame(CompositorFrame frame) override;
53 void DetachFromClient() override; 53 void DetachFromClient() override;
54 54
55 CompositorFrame* last_sent_frame() { return last_sent_frame_.get(); } 55 CompositorFrame* last_sent_frame() { return last_sent_frame_.get(); }
56 size_t num_sent_frames() { return num_sent_frames_; } 56 size_t num_sent_frames() { return num_sent_frames_; }
57 57
58 CompositorFrameSinkClient* client() { return client_; } 58 CompositorFrameSinkClient* client() { return client_; }
59 59
60 const TransferableResourceArray& resources_held_by_parent() { 60 const TransferableResourceArray& resources_held_by_parent() {
61 return resources_held_by_parent_; 61 return resources_held_by_parent_;
62 } 62 }
(...skipping 10 matching lines...) Expand all
73 scoped_refptr<ContextProvider> context_provider, 73 scoped_refptr<ContextProvider> context_provider,
74 scoped_refptr<ContextProvider> worker_context_provider); 74 scoped_refptr<ContextProvider> worker_context_provider);
75 75
76 std::unique_ptr<CompositorFrame> last_sent_frame_; 76 std::unique_ptr<CompositorFrame> last_sent_frame_;
77 size_t num_sent_frames_ = 0; 77 size_t num_sent_frames_ = 0;
78 TransferableResourceArray resources_held_by_parent_; 78 TransferableResourceArray resources_held_by_parent_;
79 bool last_swap_rect_valid_ = false; 79 bool last_swap_rect_valid_ = false;
80 gfx::Rect last_swap_rect_; 80 gfx::Rect last_swap_rect_;
81 81
82 private: 82 private:
83 void SwapBuffersAck(); 83 void DidReceiveCompositorFrameAck();
84 84
85 base::WeakPtrFactory<FakeCompositorFrameSink> weak_ptr_factory_; 85 base::WeakPtrFactory<FakeCompositorFrameSink> weak_ptr_factory_;
86 }; 86 };
87 87
88 } // namespace cc 88 } // namespace cc
89 89
90 #endif // CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_H_ 90 #endif // CC_TEST_FAKE_COMPOSITOR_FRAME_SINK_H_
OLDNEW
« no previous file with comments | « cc/test/fake_channel_impl.h ('k') | cc/test/fake_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698