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

Unified Diff: cc/surfaces/surface_factory_unittest.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/surface_factory.cc ('k') | cc/test/test_delegating_output_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_factory_unittest.cc
diff --git a/cc/surfaces/surface_factory_unittest.cc b/cc/surfaces/surface_factory_unittest.cc
index b5cfa1cc79798a517d4971f329aa4c4510ef7849..c5e6a76d9b2c904315d2fb8ceea0315fee49bc73 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -436,14 +436,11 @@ TEST_F(SurfaceFactoryTest, BlankNoIndexIncrement) {
}
void CreateSurfaceDrawCallback(SurfaceFactory* factory,
- uint32_t* execute_count,
- SurfaceDrawStatus* result,
- SurfaceDrawStatus drawn) {
+ uint32_t* execute_count) {
SurfaceId new_id(kArbitraryClientId, 7, 0);
factory->Create(new_id);
factory->Destroy(new_id);
*execute_count += 1;
- *result = drawn;
}
TEST_F(SurfaceFactoryTest, AddDuringDestroy) {
@@ -453,22 +450,17 @@ TEST_F(SurfaceFactoryTest, AddDuringDestroy) {
frame.delegated_frame_data.reset(new DelegatedFrameData);
uint32_t execute_count = 0;
- SurfaceDrawStatus drawn = SurfaceDrawStatus::DRAW_SKIPPED;
factory_->SubmitCompositorFrame(
surface_id, std::move(frame),
base::Bind(&CreateSurfaceDrawCallback, base::Unretained(factory_.get()),
- &execute_count, &drawn));
+ &execute_count));
EXPECT_EQ(0u, execute_count);
factory_->Destroy(surface_id);
EXPECT_EQ(1u, execute_count);
- EXPECT_EQ(SurfaceDrawStatus::DRAW_SKIPPED, drawn);
}
-void DrawCallback(uint32_t* execute_count,
- SurfaceDrawStatus* result,
- SurfaceDrawStatus drawn) {
+void DrawCallback(uint32_t* execute_count) {
*execute_count += 1;
- *result = drawn;
}
// Tests doing a DestroyAll before shutting down the factory;
@@ -484,15 +476,12 @@ TEST_F(SurfaceFactoryTest, DestroyAll) {
CompositorFrame frame;
frame.delegated_frame_data = std::move(frame_data);
uint32_t execute_count = 0;
- SurfaceDrawStatus drawn = SurfaceDrawStatus::DRAW_SKIPPED;
-
- factory_->SubmitCompositorFrame(
- id, std::move(frame), base::Bind(&DrawCallback, &execute_count, &drawn));
+ factory_->SubmitCompositorFrame(id, std::move(frame),
+ base::Bind(&DrawCallback, &execute_count));
surface_id_ = SurfaceId();
factory_->DestroyAll();
EXPECT_EQ(1u, execute_count);
- EXPECT_EQ(SurfaceDrawStatus::DRAW_SKIPPED, drawn);
}
TEST_F(SurfaceFactoryTest, DestroySequence) {
« no previous file with comments | « cc/surfaces/surface_factory.cc ('k') | cc/test/test_delegating_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698