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

Unified Diff: cc/layers/surface_layer_unittest.cc

Issue 2208693003: Revert of cc: Make LayerTreeTests use a DelegatingRenderer and Display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/surface_layer_unittest.cc
diff --git a/cc/layers/surface_layer_unittest.cc b/cc/layers/surface_layer_unittest.cc
index 0597cd76ddafba2845936fcaed9ad7d268867e16..5f40debf305e4484279b573d5f3133f240af27cb 100644
--- a/cc/layers/surface_layer_unittest.cc
+++ b/cc/layers/surface_layer_unittest.cc
@@ -174,6 +174,14 @@
// Check that SurfaceSequence is sent through swap promise.
class SurfaceLayerSwapPromiseWithDraw : public SurfaceLayerSwapPromise {
public:
+ SurfaceLayerSwapPromiseWithDraw() : SurfaceLayerSwapPromise() {}
+
+ std::unique_ptr<OutputSurface> CreateOutputSurface() override {
+ auto ret = FakeOutputSurface::CreateDelegating3d();
+ output_surface_ = ret.get();
+ return std::move(ret);
+ }
+
void ChangeTree() override {
++commit_count_;
switch (commit_count_) {
@@ -189,9 +197,9 @@
}
}
- void DisplayReceivedCompositorFrameOnThread(
- const CompositorFrame& frame) override {
- const std::vector<uint32_t>& satisfied = frame.metadata.satisfies_sequences;
+ void SwapBuffersCompleteOnThread() override {
+ std::vector<uint32_t>& satisfied =
+ output_surface_->last_sent_frame()->metadata.satisfies_sequences;
EXPECT_LE(satisfied.size(), 1u);
if (satisfied.size() == 1) {
// Eventually the one SurfaceSequence should be satisfied, but only
@@ -211,6 +219,8 @@
// callback.
EXPECT_TRUE(satisfied_sequence_.is_null());
}
+
+ FakeOutputSurface* output_surface_;
};
SINGLE_AND_MULTI_THREAD_TEST_F(SurfaceLayerSwapPromiseWithDraw);
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/layers/texture_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698