summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android_webview/browser/hardware_renderer.cc8
-rw-r--r--cc/surfaces/display_unittest.cc30
-rw-r--r--cc/surfaces/surface_aggregator_perftest.cc8
-rw-r--r--cc/surfaces/surface_aggregator_unittest.cc158
-rw-r--r--cc/surfaces/surface_display_output_surface.cc5
-rw-r--r--cc/surfaces/surface_factory.cc8
-rw-r--r--cc/surfaces/surface_factory.h6
-rw-r--r--cc/surfaces/surface_factory_unittest.cc69
-rw-r--r--cc/surfaces/surface_hittest_unittest.cc12
-rw-r--r--cc/surfaces/surfaces_pixeltest.cc24
-rw-r--r--components/pdf_viewer/pdf_viewer.cc2
-rw-r--r--components/view_manager/display_manager.cc2
-rw-r--r--components/view_manager/public/interfaces/surfaces.mojom6
-rw-r--r--components/view_manager/surfaces/surfaces_impl.cc14
-rw-r--r--components/view_manager/surfaces/surfaces_impl.h6
-rw-r--r--components/view_manager/surfaces/top_level_display_client.cc10
-rw-r--r--components/view_manager/surfaces/top_level_display_client.h4
-rw-r--r--content/browser/compositor/delegated_frame_host.cc2
-rw-r--r--content/browser/frame_host/render_widget_host_view_child_frame.cc3
-rw-r--r--content/browser/frame_host/render_widget_host_view_guest.cc3
-rw-r--r--content/browser/renderer_host/render_widget_host_view_android.cc7
-rw-r--r--content/browser/renderer_host/render_widget_host_view_android.h2
-rw-r--r--mandoline/ui/aura/surface_binding.cc5
-rw-r--r--mojo/cc/output_surface_mojo.cc5
24 files changed, 214 insertions, 185 deletions
diff --git a/android_webview/browser/hardware_renderer.cc b/android_webview/browser/hardware_renderer.cc
index 36a4f1f..eca386e 100644
--- a/android_webview/browser/hardware_renderer.cc
+++ b/android_webview/browser/hardware_renderer.cc
@@ -101,8 +101,8 @@ void HardwareRenderer::CommitFrame() {
surface_factory_->Create(child_id_);
}
- surface_factory_->SubmitFrame(child_id_, frame.Pass(),
- cc::SurfaceFactory::DrawCallback());
+ surface_factory_->SubmitCompositorFrame(child_id_, frame.Pass(),
+ cc::SurfaceFactory::DrawCallback());
}
void HardwareRenderer::DrawGL(bool stencil_enabled,
@@ -170,8 +170,8 @@ void HardwareRenderer::DrawGL(bool stencil_enabled,
surface_factory_->Create(root_id_);
display_->SetSurfaceId(root_id_, 1.f);
}
- surface_factory_->SubmitFrame(root_id_, frame.Pass(),
- cc::SurfaceFactory::DrawCallback());
+ surface_factory_->SubmitCompositorFrame(root_id_, frame.Pass(),
+ cc::SurfaceFactory::DrawCallback());
display_->Resize(viewport);
diff --git a/cc/surfaces/display_unittest.cc b/cc/surfaces/display_unittest.cc
index facb40e9..6058f15 100644
--- a/cc/surfaces/display_unittest.cc
+++ b/cc/surfaces/display_unittest.cc
@@ -61,15 +61,15 @@ class DisplayTest : public testing::Test {
output_surface_ptr_ = output_surface_.get();
}
- void SubmitFrame(RenderPassList* pass_list, SurfaceId surface_id) {
+ void SubmitCompositorFrame(RenderPassList* pass_list, SurfaceId surface_id) {
scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
pass_list->swap(frame_data->render_pass_list);
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = frame_data.Pass();
- factory_.SubmitFrame(surface_id, frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(surface_id, frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
SurfaceManager manager_;
@@ -175,7 +175,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
pass_list.push_back(pass.Pass());
scheduler.ResetDamageForTest();
- SubmitFrame(&pass_list, surface_id);
+ SubmitCompositorFrame(&pass_list, surface_id);
EXPECT_TRUE(scheduler.damaged);
EXPECT_FALSE(scheduler.display_resized_);
EXPECT_FALSE(scheduler.has_new_root_surface);
@@ -198,7 +198,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
pass_list.push_back(pass.Pass());
scheduler.ResetDamageForTest();
- SubmitFrame(&pass_list, surface_id);
+ SubmitCompositorFrame(&pass_list, surface_id);
EXPECT_TRUE(scheduler.damaged);
EXPECT_FALSE(scheduler.display_resized_);
EXPECT_FALSE(scheduler.has_new_root_surface);
@@ -221,7 +221,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
pass_list.push_back(pass.Pass());
scheduler.ResetDamageForTest();
- SubmitFrame(&pass_list, surface_id);
+ SubmitCompositorFrame(&pass_list, surface_id);
EXPECT_TRUE(scheduler.damaged);
EXPECT_FALSE(scheduler.display_resized_);
EXPECT_FALSE(scheduler.has_new_root_surface);
@@ -241,7 +241,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
pass_list.push_back(pass.Pass());
scheduler.ResetDamageForTest();
- SubmitFrame(&pass_list, surface_id);
+ SubmitCompositorFrame(&pass_list, surface_id);
EXPECT_TRUE(scheduler.damaged);
EXPECT_FALSE(scheduler.display_resized_);
EXPECT_FALSE(scheduler.has_new_root_surface);
@@ -261,7 +261,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
pass_list.push_back(pass.Pass());
scheduler.ResetDamageForTest();
- SubmitFrame(&pass_list, surface_id);
+ SubmitCompositorFrame(&pass_list, surface_id);
EXPECT_TRUE(scheduler.damaged);
EXPECT_FALSE(scheduler.display_resized_);
EXPECT_FALSE(scheduler.has_new_root_surface);
@@ -286,7 +286,7 @@ TEST_F(DisplayTest, DisplayDamaged) {
pass_list.push_back(pass.Pass());
scheduler.ResetDamageForTest();
- SubmitFrame(&pass_list, surface_id);
+ SubmitCompositorFrame(&pass_list, surface_id);
EXPECT_TRUE(scheduler.damaged);
EXPECT_FALSE(scheduler.display_resized_);
EXPECT_FALSE(scheduler.has_new_root_surface);
@@ -314,8 +314,8 @@ TEST_F(DisplayTest, DisplayDamaged) {
frame->delegated_frame_data = frame_data.Pass();
frame->metadata.latency_info.push_back(ui::LatencyInfo());
- factory_.SubmitFrame(surface_id, frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(surface_id, frame.Pass(),
+ SurfaceFactory::DrawCallback());
EXPECT_TRUE(scheduler.damaged);
EXPECT_FALSE(scheduler.display_resized_);
EXPECT_FALSE(scheduler.has_new_root_surface);
@@ -346,8 +346,8 @@ TEST_F(DisplayTest, DisplayDamaged) {
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = frame_data.Pass();
- factory_.SubmitFrame(surface_id, frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(surface_id, frame.Pass(),
+ SurfaceFactory::DrawCallback());
EXPECT_TRUE(scheduler.damaged);
EXPECT_FALSE(scheduler.display_resized_);
EXPECT_FALSE(scheduler.has_new_root_surface);
@@ -397,7 +397,7 @@ TEST_F(DisplayTest, Finish) {
pass->id = RenderPassId(1, 1);
pass_list.push_back(pass.Pass());
- SubmitFrame(&pass_list, surface_id);
+ SubmitCompositorFrame(&pass_list, surface_id);
}
display.DrawAndSwap();
@@ -423,7 +423,7 @@ TEST_F(DisplayTest, Finish) {
pass->id = RenderPassId(1, 1);
pass_list.push_back(pass.Pass());
- SubmitFrame(&pass_list, surface_id);
+ SubmitCompositorFrame(&pass_list, surface_id);
}
display.DrawAndSwap();
diff --git a/cc/surfaces/surface_aggregator_perftest.cc b/cc/surfaces/surface_aggregator_perftest.cc
index b265816..71589ed 100644
--- a/cc/surfaces/surface_aggregator_perftest.cc
+++ b/cc/surfaces/surface_aggregator_perftest.cc
@@ -90,8 +90,8 @@ class SurfaceAggregatorPerfTest : public testing::Test {
frame_data->render_pass_list.push_back(pass.Pass());
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = frame_data.Pass();
- factory_.SubmitFrame(SurfaceId(i), frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(SurfaceId(i), frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
factory_.Create(SurfaceId(num_surfaces + 1));
@@ -114,8 +114,8 @@ class SurfaceAggregatorPerfTest : public testing::Test {
frame_data->render_pass_list.push_back(pass.Pass());
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = frame_data.Pass();
- factory_.SubmitFrame(SurfaceId(num_surfaces + 1), frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(SurfaceId(num_surfaces + 1), frame.Pass(),
+ SurfaceFactory::DrawCallback());
scoped_ptr<CompositorFrame> aggregated =
aggregator_->Aggregate(SurfaceId(num_surfaces + 1));
diff --git a/cc/surfaces/surface_aggregator_unittest.cc b/cc/surfaces/surface_aggregator_unittest.cc
index 1d6aadf..b2476d9 100644
--- a/cc/surfaces/surface_aggregator_unittest.cc
+++ b/cc/surfaces/surface_aggregator_unittest.cc
@@ -126,13 +126,13 @@ class SurfaceAggregatorValidSurfaceTest : public SurfaceAggregatorTest {
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = frame_data.Pass();
- factory_.SubmitFrame(surface_id, frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(surface_id, frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
- void SubmitFrame(test::Pass* passes,
- size_t pass_count,
- SurfaceId surface_id) {
+ void SubmitCompositorFrame(test::Pass* passes,
+ size_t pass_count,
+ SurfaceId surface_id) {
RenderPassList pass_list;
AddPasses(&pass_list, gfx::Rect(SurfaceSize()), passes, pass_count);
SubmitPassListAsFrame(surface_id, &pass_list);
@@ -145,8 +145,8 @@ class SurfaceAggregatorValidSurfaceTest : public SurfaceAggregatorTest {
scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
child_frame->delegated_frame_data = delegated_frame_data.Pass();
- factory_.SubmitFrame(surface_id, child_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(surface_id, child_frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
protected:
@@ -162,7 +162,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, SimpleFrame) {
test::Quad::SolidColorQuad(SK_ColorBLUE)};
test::Pass passes[] = {test::Pass(quads, arraysize(quads))};
- SubmitFrame(passes, arraysize(passes), root_surface_id_);
+ SubmitCompositorFrame(passes, arraysize(passes), root_surface_id_);
SurfaceId ids[] = {root_surface_id_};
AggregateAndVerify(passes, arraysize(passes), ids, arraysize(ids));
@@ -177,12 +177,13 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, OpacityCopied) {
test::Pass embedded_passes[] = {
test::Pass(embedded_quads, arraysize(embedded_quads))};
- SubmitFrame(embedded_passes, arraysize(embedded_passes), embedded_surface_id);
+ SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
+ embedded_surface_id);
test::Quad quads[] = {test::Quad::SurfaceQuad(embedded_surface_id, .5f)};
test::Pass passes[] = {test::Pass(quads, arraysize(quads))};
- SubmitFrame(passes, arraysize(passes), root_surface_id_);
+ SubmitCompositorFrame(passes, arraysize(passes), root_surface_id_);
scoped_ptr<CompositorFrame> aggregated_frame =
aggregator_.Aggregate(root_surface_id_);
@@ -217,7 +218,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, MultiPassSimpleFrame) {
test::Pass(quads[0], arraysize(quads[0]), RenderPassId(1, 1)),
test::Pass(quads[1], arraysize(quads[1]), RenderPassId(1, 2))};
- SubmitFrame(passes, arraysize(passes), root_surface_id_);
+ SubmitCompositorFrame(passes, arraysize(passes), root_surface_id_);
SurfaceId ids[] = {root_surface_id_};
AggregateAndVerify(passes, arraysize(passes), ids, arraysize(ids));
@@ -235,14 +236,15 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, SimpleSurfaceReference) {
test::Pass embedded_passes[] = {
test::Pass(embedded_quads, arraysize(embedded_quads))};
- SubmitFrame(embedded_passes, arraysize(embedded_passes), embedded_surface_id);
+ SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
+ embedded_surface_id);
test::Quad root_quads[] = {test::Quad::SolidColorQuad(SK_ColorWHITE),
test::Quad::SurfaceQuad(embedded_surface_id, 1.f),
test::Quad::SolidColorQuad(SK_ColorBLACK)};
test::Pass root_passes[] = {test::Pass(root_quads, arraysize(root_quads))};
- SubmitFrame(root_passes, arraysize(root_passes), root_surface_id_);
+ SubmitCompositorFrame(root_passes, arraysize(root_passes), root_surface_id_);
test::Quad expected_quads[] = {test::Quad::SolidColorQuad(SK_ColorWHITE),
test::Quad::SolidColorQuad(SK_ColorGREEN),
@@ -264,7 +266,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, CopyRequest) {
test::Pass embedded_passes[] = {
test::Pass(embedded_quads, arraysize(embedded_quads))};
- SubmitFrame(embedded_passes, arraysize(embedded_passes), embedded_surface_id);
+ SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
+ embedded_surface_id);
scoped_ptr<CopyOutputRequest> copy_request(
CopyOutputRequest::CreateEmptyRequest());
CopyOutputRequest* copy_request_ptr = copy_request.get();
@@ -275,7 +278,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, CopyRequest) {
test::Quad::SolidColorQuad(SK_ColorBLACK)};
test::Pass root_passes[] = {test::Pass(root_quads, arraysize(root_quads))};
- SubmitFrame(root_passes, arraysize(root_passes), root_surface_id_);
+ SubmitCompositorFrame(root_passes, arraysize(root_passes), root_surface_id_);
scoped_ptr<CompositorFrame> aggregated_frame =
aggregator_.Aggregate(root_surface_id_);
@@ -321,7 +324,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, RootCopyRequest) {
test::Pass embedded_passes[] = {
test::Pass(embedded_quads, arraysize(embedded_quads))};
- SubmitFrame(embedded_passes, arraysize(embedded_passes), embedded_surface_id);
+ SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
+ embedded_surface_id);
scoped_ptr<CopyOutputRequest> copy_request(
CopyOutputRequest::CreateEmptyRequest());
CopyOutputRequest* copy_request_ptr = copy_request.get();
@@ -351,8 +355,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, RootCopyRequest) {
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = frame_data.Pass();
- factory_.SubmitFrame(root_surface_id_, frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(root_surface_id_, frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
scoped_ptr<CompositorFrame> aggregated_frame =
@@ -418,7 +422,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, MultiPassSurfaceReference) {
test::Pass(embedded_quads[1], arraysize(embedded_quads[1]), pass_ids[1]),
test::Pass(embedded_quads[2], arraysize(embedded_quads[2]), pass_ids[2])};
- SubmitFrame(embedded_passes, arraysize(embedded_passes), embedded_surface_id);
+ SubmitCompositorFrame(embedded_passes, arraysize(embedded_passes),
+ embedded_surface_id);
test::Quad root_quads[][2] = {
{test::Quad::SolidColorQuad(5), test::Quad::SolidColorQuad(6)},
@@ -430,7 +435,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, MultiPassSurfaceReference) {
test::Pass(root_quads[1], arraysize(root_quads[1]), pass_ids[1]),
test::Pass(root_quads[2], arraysize(root_quads[2]), pass_ids[2])};
- SubmitFrame(root_passes, arraysize(root_passes), root_surface_id_);
+ SubmitCompositorFrame(root_passes, arraysize(root_passes), root_surface_id_);
scoped_ptr<CompositorFrame> aggregated_frame =
aggregator_.Aggregate(root_surface_id_);
@@ -547,7 +552,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, InvalidSurfaceReference) {
test::Quad::SolidColorQuad(SK_ColorBLUE)};
test::Pass passes[] = {test::Pass(quads, arraysize(quads))};
- SubmitFrame(passes, arraysize(passes), root_surface_id_);
+ SubmitCompositorFrame(passes, arraysize(passes), root_surface_id_);
test::Quad expected_quads[] = {test::Quad::SolidColorQuad(SK_ColorGREEN),
test::Quad::SolidColorQuad(SK_ColorBLUE)};
@@ -568,7 +573,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, ValidSurfaceReferenceWithNoFrame) {
test::Quad::SolidColorQuad(SK_ColorBLUE)};
test::Pass passes[] = {test::Pass(quads, arraysize(quads))};
- SubmitFrame(passes, arraysize(passes), root_surface_id_);
+ SubmitCompositorFrame(passes, arraysize(passes), root_surface_id_);
test::Quad expected_quads[] = {test::Quad::SolidColorQuad(SK_ColorGREEN),
test::Quad::SolidColorQuad(SK_ColorBLUE)};
@@ -587,7 +592,7 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, SimpleCyclicalReference) {
test::Quad::SolidColorQuad(SK_ColorYELLOW)};
test::Pass passes[] = {test::Pass(quads, arraysize(quads))};
- SubmitFrame(passes, arraysize(passes), root_surface_id_);
+ SubmitCompositorFrame(passes, arraysize(passes), root_surface_id_);
test::Quad expected_quads[] = {test::Quad::SolidColorQuad(SK_ColorYELLOW)};
test::Pass expected_passes[] = {
@@ -608,14 +613,16 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, TwoSurfaceCyclicalReference) {
test::Pass parent_passes[] = {
test::Pass(parent_quads, arraysize(parent_quads))};
- SubmitFrame(parent_passes, arraysize(parent_passes), root_surface_id_);
+ SubmitCompositorFrame(parent_passes, arraysize(parent_passes),
+ root_surface_id_);
test::Quad child_quads[] = {test::Quad::SolidColorQuad(SK_ColorGREEN),
test::Quad::SurfaceQuad(root_surface_id_, 1.f),
test::Quad::SolidColorQuad(SK_ColorMAGENTA)};
test::Pass child_passes[] = {test::Pass(child_quads, arraysize(child_quads))};
- SubmitFrame(child_passes, arraysize(child_passes), child_surface_id);
+ SubmitCompositorFrame(child_passes, arraysize(child_passes),
+ child_surface_id);
// The child surface's reference to the root_surface_ will be dropped, so
// we'll end up with:
@@ -648,7 +655,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, RenderPassIdMapping) {
test::Pass(child_quad[0], arraysize(child_quad[0]), child_pass_id[0]),
test::Pass(child_quad[1], arraysize(child_quad[1]), child_pass_id[1])};
- SubmitFrame(surface_passes, arraysize(surface_passes), child_surface_id);
+ SubmitCompositorFrame(surface_passes, arraysize(surface_passes),
+ child_surface_id);
// Pass IDs from the parent surface may collide with ones from the child.
RenderPassId parent_pass_id[] = {RenderPassId(2, 1), RenderPassId(1, 2)};
@@ -659,7 +667,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, RenderPassIdMapping) {
test::Pass(parent_quad[0], arraysize(parent_quad[0]), parent_pass_id[0]),
test::Pass(parent_quad[1], arraysize(parent_quad[1]), parent_pass_id[1])};
- SubmitFrame(parent_passes, arraysize(parent_passes), root_surface_id_);
+ SubmitCompositorFrame(parent_passes, arraysize(parent_passes),
+ root_surface_id_);
scoped_ptr<CompositorFrame> aggregated_frame =
aggregator_.Aggregate(root_surface_id_);
@@ -906,8 +915,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateMultiplePassWithTransform) {
scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
child_frame->delegated_frame_data = child_frame_data.Pass();
- factory_.SubmitFrame(child_surface_id, child_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(child_surface_id, child_frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
// Middle child surface.
@@ -937,8 +946,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateMultiplePassWithTransform) {
scoped_ptr<CompositorFrame> middle_frame(new CompositorFrame);
middle_frame->delegated_frame_data = middle_frame_data.Pass();
- factory_.SubmitFrame(middle_surface_id, middle_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(middle_surface_id, middle_frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
// Root surface.
@@ -973,8 +982,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateMultiplePassWithTransform) {
scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
root_frame->delegated_frame_data = root_frame_data.Pass();
- factory_.SubmitFrame(root_surface_id_, root_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(root_surface_id_, root_frame.Pass(),
+ SurfaceFactory::DrawCallback());
scoped_ptr<CompositorFrame> aggregated_frame =
aggregator_.Aggregate(root_surface_id_);
@@ -1082,8 +1091,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) {
SurfaceId child_surface_id = allocator_.GenerateId();
factory_.Create(child_surface_id);
- factory_.SubmitFrame(child_surface_id, child_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(child_surface_id, child_frame.Pass(),
+ SurfaceFactory::DrawCallback());
test::Quad parent_surface_quads[] = {
test::Quad::SurfaceQuad(child_surface_id, 1.f)};
@@ -1108,8 +1117,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) {
SurfaceId parent_surface_id = allocator_.GenerateId();
factory_.Create(parent_surface_id);
- factory_.SubmitFrame(parent_surface_id, parent_surface_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(parent_surface_id, parent_surface_frame.Pass(),
+ SurfaceFactory::DrawCallback());
test::Quad root_surface_quads[] = {
test::Quad::SurfaceQuad(parent_surface_id, 1.f)};
@@ -1140,8 +1149,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) {
scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
root_frame->delegated_frame_data = root_frame_data.Pass();
- factory_.SubmitFrame(root_surface_id_, root_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(root_surface_id_, root_frame.Pass(),
+ SurfaceFactory::DrawCallback());
scoped_ptr<CompositorFrame> aggregated_frame =
aggregator_.Aggregate(root_surface_id_);
@@ -1177,8 +1186,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) {
scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
child_frame->delegated_frame_data = child_frame_data.Pass();
- factory_.SubmitFrame(child_surface_id, child_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(child_surface_id, child_frame.Pass(),
+ SurfaceFactory::DrawCallback());
scoped_ptr<CompositorFrame> aggregated_frame =
aggregator_.Aggregate(root_surface_id_);
@@ -1217,8 +1226,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) {
scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
root_frame->delegated_frame_data = root_frame_data.Pass();
- factory_.SubmitFrame(root_surface_id_, root_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(root_surface_id_, root_frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
{
@@ -1239,8 +1248,8 @@ TEST_F(SurfaceAggregatorValidSurfaceTest, AggregateDamageRect) {
scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
root_frame->delegated_frame_data = root_frame_data.Pass();
- factory_.SubmitFrame(root_surface_id_, root_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(root_surface_id_, root_frame.Pass(),
+ SurfaceFactory::DrawCallback());
scoped_ptr<CompositorFrame> aggregated_frame =
aggregator_.Aggregate(root_surface_id_);
@@ -1536,12 +1545,12 @@ class ResourceTrackingSurfaceFactoryClient : public SurfaceFactoryClient {
DISALLOW_COPY_AND_ASSIGN(ResourceTrackingSurfaceFactoryClient);
};
-void SubmitFrameWithResources(ResourceId* resource_ids,
- size_t num_resource_ids,
- bool valid,
- SurfaceId child_id,
- SurfaceFactory* factory,
- SurfaceId surface_id) {
+void SubmitCompositorFrameWithResources(ResourceId* resource_ids,
+ size_t num_resource_ids,
+ bool valid,
+ SurfaceId child_id,
+ SurfaceFactory* factory,
+ SurfaceId surface_id) {
scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
scoped_ptr<RenderPass> pass = RenderPass::Create();
pass->id = RenderPassId(1, 1);
@@ -1580,8 +1589,8 @@ void SubmitFrameWithResources(ResourceId* resource_ids,
frame_data->render_pass_list.push_back(pass.Pass());
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = frame_data.Pass();
- factory->SubmitFrame(surface_id, frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory->SubmitCompositorFrame(surface_id, frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) {
@@ -1591,15 +1600,16 @@ TEST_F(SurfaceAggregatorWithResourcesTest, TakeResourcesOneSurface) {
factory.Create(surface_id);
ResourceId ids[] = {11, 12, 13};
- SubmitFrameWithResources(ids, arraysize(ids), true, SurfaceId(), &factory,
- surface_id);
+ SubmitCompositorFrameWithResources(ids, arraysize(ids), true, SurfaceId(),
+ &factory, surface_id);
scoped_ptr<CompositorFrame> frame = aggregator_->Aggregate(surface_id);
// Nothing should be available to be returned yet.
EXPECT_TRUE(client.returned_resources().empty());
- SubmitFrameWithResources(NULL, 0u, true, SurfaceId(), &factory, surface_id);
+ SubmitCompositorFrameWithResources(NULL, 0u, true, SurfaceId(), &factory,
+ surface_id);
frame = aggregator_->Aggregate(surface_id);
@@ -1631,7 +1641,8 @@ TEST_F(SurfaceAggregatorWithResourcesTest, TakeInvalidResources) {
frame_data->render_pass_list.push_back(pass.Pass());
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = frame_data.Pass();
- factory.SubmitFrame(surface_id, frame.Pass(), SurfaceFactory::DrawCallback());
+ factory.SubmitCompositorFrame(surface_id, frame.Pass(),
+ SurfaceFactory::DrawCallback());
scoped_ptr<CompositorFrame> returned_frame =
aggregator_->Aggregate(surface_id);
@@ -1639,7 +1650,8 @@ TEST_F(SurfaceAggregatorWithResourcesTest, TakeInvalidResources) {
// Nothing should be available to be returned yet.
EXPECT_TRUE(client.returned_resources().empty());
- SubmitFrameWithResources(NULL, 0, true, SurfaceId(), &factory, surface_id);
+ SubmitCompositorFrameWithResources(NULL, 0, true, SurfaceId(), &factory,
+ surface_id);
ASSERT_EQ(1u, client.returned_resources().size());
EXPECT_EQ(11u, client.returned_resources()[0].id);
@@ -1655,15 +1667,16 @@ TEST_F(SurfaceAggregatorWithResourcesTest, TwoSurfaces) {
factory.Create(surface_id2);
ResourceId ids[] = {11, 12, 13};
- SubmitFrameWithResources(ids, arraysize(ids), true, SurfaceId(), &factory,
- surface_id);
+ SubmitCompositorFrameWithResources(ids, arraysize(ids), true, SurfaceId(),
+ &factory, surface_id);
ResourceId ids2[] = {14, 15, 16};
- SubmitFrameWithResources(ids2, arraysize(ids2), true, SurfaceId(), &factory,
- surface_id2);
+ SubmitCompositorFrameWithResources(ids2, arraysize(ids2), true, SurfaceId(),
+ &factory, surface_id2);
scoped_ptr<CompositorFrame> frame = aggregator_->Aggregate(surface_id);
- SubmitFrameWithResources(NULL, 0, true, SurfaceId(), &factory, surface_id);
+ SubmitCompositorFrameWithResources(NULL, 0, true, SurfaceId(), &factory,
+ surface_id);
// Nothing should be available to be returned yet.
EXPECT_TRUE(client.returned_resources().empty());
@@ -1696,16 +1709,18 @@ TEST_F(SurfaceAggregatorWithResourcesTest, InvalidChildSurface) {
factory.Create(child_surface_id);
ResourceId ids[] = {14, 15, 16};
- SubmitFrameWithResources(ids, arraysize(ids), true, SurfaceId(), &factory,
- child_surface_id);
+ SubmitCompositorFrameWithResources(ids, arraysize(ids), true, SurfaceId(),
+ &factory, child_surface_id);
ResourceId ids2[] = {17, 18, 19};
- SubmitFrameWithResources(ids2, arraysize(ids2), false, child_surface_id,
- &factory, middle_surface_id);
+ SubmitCompositorFrameWithResources(ids2, arraysize(ids2), false,
+ child_surface_id, &factory,
+ middle_surface_id);
ResourceId ids3[] = {20, 21, 22};
- SubmitFrameWithResources(ids3, arraysize(ids3), true, middle_surface_id,
- &factory, root_surface_id);
+ SubmitCompositorFrameWithResources(ids3, arraysize(ids3), true,
+ middle_surface_id, &factory,
+ root_surface_id);
scoped_ptr<CompositorFrame> frame;
frame = aggregator_->Aggregate(root_surface_id);
@@ -1715,8 +1730,9 @@ TEST_F(SurfaceAggregatorWithResourcesTest, InvalidChildSurface) {
EXPECT_EQ(1u, pass_list->back()->shared_quad_state_list.size());
EXPECT_EQ(3u, pass_list->back()->quad_list.size());
- SubmitFrameWithResources(ids2, arraysize(ids), true, child_surface_id,
- &factory, middle_surface_id);
+ SubmitCompositorFrameWithResources(ids2, arraysize(ids), true,
+ child_surface_id, &factory,
+ middle_surface_id);
frame = aggregator_->Aggregate(root_surface_id);
diff --git a/cc/surfaces/surface_display_output_surface.cc b/cc/surfaces/surface_display_output_surface.cc
index 6a2779d..ed26b49 100644
--- a/cc/surfaces/surface_display_output_surface.cc
+++ b/cc/surfaces/surface_display_output_surface.cc
@@ -64,7 +64,7 @@ void SurfaceDisplayOutputSurface::SwapBuffers(CompositorFrame* frame) {
scoped_ptr<CompositorFrame> frame_copy(new CompositorFrame());
frame->AssignTo(frame_copy.get());
- factory_.SubmitFrame(
+ factory_.SubmitCompositorFrame(
surface_id_, frame_copy.Pass(),
base::Bind(&SurfaceDisplayOutputSurface::SwapBuffersComplete,
base::Unretained(this)));
@@ -81,7 +81,8 @@ bool SurfaceDisplayOutputSurface::BindToClient(OutputSurfaceClient* client) {
void SurfaceDisplayOutputSurface::ForceReclaimResources() {
if (!surface_id_.is_null())
- factory_.SubmitFrame(surface_id_, nullptr, SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(surface_id_, nullptr,
+ SurfaceFactory::DrawCallback());
}
void SurfaceDisplayOutputSurface::ReturnResources(
diff --git a/cc/surfaces/surface_factory.cc b/cc/surfaces/surface_factory.cc
index 1681c41..3e83c8c 100644
--- a/cc/surfaces/surface_factory.cc
+++ b/cc/surfaces/surface_factory.cc
@@ -48,10 +48,10 @@ void SurfaceFactory::Destroy(SurfaceId surface_id) {
manager_->Destroy(surface_map_.take_and_erase(it));
}
-void SurfaceFactory::SubmitFrame(SurfaceId surface_id,
- scoped_ptr<CompositorFrame> frame,
- const DrawCallback& callback) {
- TRACE_EVENT0("cc", "SurfaceFactory::SubmitFrame");
+void SurfaceFactory::SubmitCompositorFrame(SurfaceId surface_id,
+ scoped_ptr<CompositorFrame> frame,
+ const DrawCallback& callback) {
+ TRACE_EVENT0("cc", "SurfaceFactory::SubmitCompositorFrame");
OwningSurfaceMap::iterator it = surface_map_.find(surface_id);
DCHECK(it != surface_map_.end());
DCHECK(it->second->factory().get() == this);
diff --git a/cc/surfaces/surface_factory.h b/cc/surfaces/surface_factory.h
index 0e812de..af9fa92 100644
--- a/cc/surfaces/surface_factory.h
+++ b/cc/surfaces/surface_factory.h
@@ -49,9 +49,9 @@ class CC_SURFACES_EXPORT SurfaceFactory
// although the frame may reference surfaces created by other factories.
// The callback is called the first time this frame is used to draw, or if
// the frame is discarded.
- void SubmitFrame(SurfaceId surface_id,
- scoped_ptr<CompositorFrame> frame,
- const DrawCallback& callback);
+ void SubmitCompositorFrame(SurfaceId surface_id,
+ scoped_ptr<CompositorFrame> frame,
+ const DrawCallback& callback);
void RequestCopyOfSurface(SurfaceId surface_id,
scoped_ptr<CopyOutputRequest> copy_request);
diff --git a/cc/surfaces/surface_factory_unittest.cc b/cc/surfaces/surface_factory_unittest.cc
index c2951ae..c7ce964 100644
--- a/cc/surfaces/surface_factory_unittest.cc
+++ b/cc/surfaces/surface_factory_unittest.cc
@@ -49,8 +49,8 @@ class SurfaceFactoryTest : public testing::Test {
factory_.Destroy(surface_id_);
}
- void SubmitFrameWithResources(ResourceId* resource_ids,
- size_t num_resource_ids) {
+ void SubmitCompositorFrameWithResources(ResourceId* resource_ids,
+ size_t num_resource_ids) {
scoped_ptr<DelegatedFrameData> frame_data(new DelegatedFrameData);
for (size_t i = 0u; i < num_resource_ids; ++i) {
TransferableResource resource;
@@ -60,8 +60,8 @@ class SurfaceFactoryTest : public testing::Test {
}
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = frame_data.Pass();
- factory_.SubmitFrame(surface_id_, frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(surface_id_, frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
void UnrefResources(ResourceId* ids_to_unref,
@@ -108,7 +108,8 @@ class SurfaceFactoryTest : public testing::Test {
// with no resource provider action in between.
TEST_F(SurfaceFactoryTest, ResourceLifetimeSimple) {
ResourceId first_frame_ids[] = {1, 2, 3};
- SubmitFrameWithResources(first_frame_ids, arraysize(first_frame_ids));
+ SubmitCompositorFrameWithResources(first_frame_ids,
+ arraysize(first_frame_ids));
// All of the resources submitted in the first frame are still in use at this
// time by virtue of being in the pending frame, so none can be returned to
@@ -118,7 +119,7 @@ TEST_F(SurfaceFactoryTest, ResourceLifetimeSimple) {
// The second frame references no resources and thus should make all resources
// available to be returned.
- SubmitFrameWithResources(NULL, 0);
+ SubmitCompositorFrameWithResources(NULL, 0);
ResourceId expected_returned_ids[] = {1, 2, 3};
int expected_returned_counts[] = {1, 1, 1};
@@ -131,7 +132,8 @@ TEST_F(SurfaceFactoryTest, ResourceLifetimeSimple) {
// with the resource provider holding everything alive.
TEST_F(SurfaceFactoryTest, ResourceLifetimeSimpleWithProviderHoldingAlive) {
ResourceId first_frame_ids[] = {1, 2, 3};
- SubmitFrameWithResources(first_frame_ids, arraysize(first_frame_ids));
+ SubmitCompositorFrameWithResources(first_frame_ids,
+ arraysize(first_frame_ids));
// All of the resources submitted in the first frame are still in use at this
// time by virtue of being in the pending frame, so none can be returned to
@@ -144,7 +146,7 @@ TEST_F(SurfaceFactoryTest, ResourceLifetimeSimpleWithProviderHoldingAlive) {
// The second frame references no resources and thus should make all resources
// available to be returned as soon as the resource provider releases them.
- SubmitFrameWithResources(NULL, 0);
+ SubmitCompositorFrameWithResources(NULL, 0);
EXPECT_EQ(0u, client_.returned_resources().size());
client_.clear_returned_resources();
@@ -163,16 +165,18 @@ TEST_F(SurfaceFactoryTest, ResourceLifetimeSimpleWithProviderHoldingAlive) {
// before returning it to the client.
TEST_F(SurfaceFactoryTest, ResourceReusedBeforeReturn) {
ResourceId first_frame_ids[] = {7};
- SubmitFrameWithResources(first_frame_ids, arraysize(first_frame_ids));
+ SubmitCompositorFrameWithResources(first_frame_ids,
+ arraysize(first_frame_ids));
// This removes all references to resource id 7.
- SubmitFrameWithResources(NULL, 0);
+ SubmitCompositorFrameWithResources(NULL, 0);
// This references id 7 again.
- SubmitFrameWithResources(first_frame_ids, arraysize(first_frame_ids));
+ SubmitCompositorFrameWithResources(first_frame_ids,
+ arraysize(first_frame_ids));
// This removes it again.
- SubmitFrameWithResources(NULL, 0);
+ SubmitCompositorFrameWithResources(NULL, 0);
// Now it should be returned.
// We don't care how many entries are in the returned array for 7, so long as
@@ -190,14 +194,16 @@ TEST_F(SurfaceFactoryTest, ResourceReusedBeforeReturn) {
// multiple providers.
TEST_F(SurfaceFactoryTest, ResourceRefMultipleTimes) {
ResourceId first_frame_ids[] = {3, 4};
- SubmitFrameWithResources(first_frame_ids, arraysize(first_frame_ids));
+ SubmitCompositorFrameWithResources(first_frame_ids,
+ arraysize(first_frame_ids));
// Ref resources from the first frame twice.
RefCurrentFrameResources();
RefCurrentFrameResources();
ResourceId second_frame_ids[] = {4, 5};
- SubmitFrameWithResources(second_frame_ids, arraysize(second_frame_ids));
+ SubmitCompositorFrameWithResources(second_frame_ids,
+ arraysize(second_frame_ids));
// Ref resources from the second frame 3 times.
RefCurrentFrameResources();
@@ -206,7 +212,7 @@ TEST_F(SurfaceFactoryTest, ResourceRefMultipleTimes) {
// Submit a frame with no resources to remove all current frame refs from
// submitted resources.
- SubmitFrameWithResources(NULL, 0);
+ SubmitCompositorFrameWithResources(NULL, 0);
EXPECT_EQ(0u, client_.returned_resources().size());
client_.clear_returned_resources();
@@ -267,7 +273,8 @@ TEST_F(SurfaceFactoryTest, ResourceRefMultipleTimes) {
TEST_F(SurfaceFactoryTest, ResourceLifetime) {
ResourceId first_frame_ids[] = {1, 2, 3};
- SubmitFrameWithResources(first_frame_ids, arraysize(first_frame_ids));
+ SubmitCompositorFrameWithResources(first_frame_ids,
+ arraysize(first_frame_ids));
// All of the resources submitted in the first frame are still in use at this
// time by virtue of being in the pending frame, so none can be returned to
@@ -279,7 +286,8 @@ TEST_F(SurfaceFactoryTest, ResourceLifetime) {
// ones. We expect to receive back resource 1 with a count of 1 since it was
// only referenced by the first frame.
ResourceId second_frame_ids[] = {2, 3, 4};
- SubmitFrameWithResources(second_frame_ids, arraysize(second_frame_ids));
+ SubmitCompositorFrameWithResources(second_frame_ids,
+ arraysize(second_frame_ids));
{
SCOPED_TRACE("second frame");
@@ -295,7 +303,8 @@ TEST_F(SurfaceFactoryTest, ResourceLifetime) {
// and 3 will have counts of 2, since they were used in both frames, and
// resource ID 4 will have a count of 1.
ResourceId third_frame_ids[] = {10, 11, 12, 13};
- SubmitFrameWithResources(third_frame_ids, arraysize(third_frame_ids));
+ SubmitCompositorFrameWithResources(third_frame_ids,
+ arraysize(third_frame_ids));
{
SCOPED_TRACE("third frame");
@@ -310,7 +319,8 @@ TEST_F(SurfaceFactoryTest, ResourceLifetime) {
RefCurrentFrameResources();
ResourceId fourth_frame_ids[] = {12, 13};
- SubmitFrameWithResources(fourth_frame_ids, arraysize(fourth_frame_ids));
+ SubmitCompositorFrameWithResources(fourth_frame_ids,
+ arraysize(fourth_frame_ids));
EXPECT_EQ(0u, client_.returned_resources().size());
@@ -348,7 +358,7 @@ TEST_F(SurfaceFactoryTest, ResourceLifetime) {
EXPECT_EQ(0u, client_.returned_resources().size());
// If we submit an empty frame, however, they should become available.
- SubmitFrameWithResources(NULL, 0u);
+ SubmitCompositorFrameWithResources(NULL, 0u);
{
SCOPED_TRACE("fourth frame, second unref");
@@ -369,8 +379,8 @@ TEST_F(SurfaceFactoryTest, BlankNoIndexIncrement) {
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data.reset(new DelegatedFrameData);
- factory_.SubmitFrame(surface_id, frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(surface_id, frame.Pass(),
+ SurfaceFactory::DrawCallback());
EXPECT_EQ(2, surface->frame_index());
factory_.Destroy(surface_id);
}
@@ -397,8 +407,8 @@ TEST_F(SurfaceFactoryTest, DestroyAll) {
uint32 execute_count = 0;
SurfaceDrawStatus drawn = SurfaceDrawStatus::DRAW_SKIPPED;
- factory_.SubmitFrame(id, frame.Pass(),
- base::Bind(&DrawCallback, &execute_count, &drawn));
+ factory_.SubmitCompositorFrame(
+ id, frame.Pass(), base::Bind(&DrawCallback, &execute_count, &drawn));
surface_id_ = SurfaceId();
factory_.DestroyAll();
@@ -423,8 +433,8 @@ TEST_F(SurfaceFactoryTest, DestroySequence) {
frame->metadata.satisfies_sequences.push_back(4);
frame->delegated_frame_data = frame_data.Pass();
DCHECK(manager_.GetSurfaceForId(id2));
- factory_.SubmitFrame(surface_id_, frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(surface_id_, frame.Pass(),
+ SurfaceFactory::DrawCallback());
DCHECK(!manager_.GetSurfaceForId(id2));
// Check that waiting after the sequence is satisfied works.
@@ -475,7 +485,8 @@ TEST_F(SurfaceFactoryTest, DestroyCycle) {
frame_data->render_pass_list.push_back(render_pass.Pass());
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = frame_data.Pass();
- factory_.SubmitFrame(id2, frame.Pass(), SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(id2, frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
factory_.Destroy(id2);
@@ -487,8 +498,8 @@ TEST_F(SurfaceFactoryTest, DestroyCycle) {
frame_data->render_pass_list.push_back(render_pass.Pass());
scoped_ptr<CompositorFrame> frame(new CompositorFrame);
frame->delegated_frame_data = frame_data.Pass();
- factory_.SubmitFrame(surface_id_, frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(surface_id_, frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
factory_.Destroy(surface_id_);
EXPECT_TRUE(manager_.GetSurfaceForId(id2));
diff --git a/cc/surfaces/surface_hittest_unittest.cc b/cc/surfaces/surface_hittest_unittest.cc
index 0929259..ac1de65 100644
--- a/cc/surfaces/surface_hittest_unittest.cc
+++ b/cc/surfaces/surface_hittest_unittest.cc
@@ -42,8 +42,8 @@ TEST(SurfaceHittestTest, Hittest_SingleSurface) {
delegated_frame_data->render_pass_list.push_back(pass.Pass());
scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
root_frame->delegated_frame_data = delegated_frame_data.Pass();
- factory.SubmitFrame(root_surface_id, root_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory.SubmitCompositorFrame(root_surface_id, root_frame.Pass(),
+ SurfaceFactory::DrawCallback());
{
SurfaceHittest hittest(&manager);
@@ -99,8 +99,8 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) {
root_delegated_frame_data->render_pass_list.push_back(root_pass.Pass());
scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
root_frame->delegated_frame_data = root_delegated_frame_data.Pass();
- factory.SubmitFrame(root_surface_id, root_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory.SubmitCompositorFrame(root_surface_id, root_frame.Pass(),
+ SurfaceFactory::DrawCallback());
// Creates a child surface.
factory.Create(child_surface_id);
@@ -129,8 +129,8 @@ TEST(SurfaceHittestTest, Hittest_ChildSurface) {
child_delegated_frame_data->render_pass_list.push_back(child_pass.Pass());
scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
child_frame->delegated_frame_data = child_delegated_frame_data.Pass();
- factory.SubmitFrame(child_surface_id, child_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory.SubmitCompositorFrame(child_surface_id, child_frame.Pass(),
+ SurfaceFactory::DrawCallback());
{
SurfaceHittest hittest(&manager);
diff --git a/cc/surfaces/surfaces_pixeltest.cc b/cc/surfaces/surfaces_pixeltest.cc
index 6c821a6..a584f7c 100644
--- a/cc/surfaces/surfaces_pixeltest.cc
+++ b/cc/surfaces/surfaces_pixeltest.cc
@@ -80,8 +80,8 @@ TEST_F(SurfacesPixelTest, DrawSimpleFrame) {
SurfaceId root_surface_id = allocator_.GenerateId();
factory_.Create(root_surface_id);
- factory_.SubmitFrame(root_surface_id, root_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(root_surface_id, root_frame.Pass(),
+ SurfaceFactory::DrawCallback());
SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
scoped_ptr<CompositorFrame> aggregated_frame =
@@ -135,8 +135,8 @@ TEST_F(SurfacesPixelTest, DrawSimpleAggregatedFrame) {
scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
root_frame->delegated_frame_data = delegated_frame_data.Pass();
- factory_.SubmitFrame(root_surface_id, root_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(root_surface_id, root_frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
{
@@ -163,8 +163,8 @@ TEST_F(SurfacesPixelTest, DrawSimpleAggregatedFrame) {
scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
child_frame->delegated_frame_data = delegated_frame_data.Pass();
- factory_.SubmitFrame(child_surface_id, child_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(child_surface_id, child_frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
@@ -234,8 +234,8 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) {
scoped_ptr<CompositorFrame> root_frame(new CompositorFrame);
root_frame->delegated_frame_data = delegated_frame_data.Pass();
- factory_.SubmitFrame(root_surface_id, root_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(root_surface_id, root_frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
{
@@ -270,8 +270,8 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) {
scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
child_frame->delegated_frame_data = delegated_frame_data.Pass();
- factory_.SubmitFrame(left_child_id, child_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(left_child_id, child_frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
{
@@ -306,8 +306,8 @@ TEST_F(SurfacesPixelTest, DrawAggregatedFrameWithSurfaceTransforms) {
scoped_ptr<CompositorFrame> child_frame(new CompositorFrame);
child_frame->delegated_frame_data = delegated_frame_data.Pass();
- factory_.SubmitFrame(right_child_id, child_frame.Pass(),
- SurfaceFactory::DrawCallback());
+ factory_.SubmitCompositorFrame(right_child_id, child_frame.Pass(),
+ SurfaceFactory::DrawCallback());
}
SurfaceAggregator aggregator(&manager_, resource_provider_.get(), true);
diff --git a/components/pdf_viewer/pdf_viewer.cc b/components/pdf_viewer/pdf_viewer.cc
index aba1f63..34b7b0d 100644
--- a/components/pdf_viewer/pdf_viewer.cc
+++ b/components/pdf_viewer/pdf_viewer.cc
@@ -266,7 +266,7 @@ class BitmapUploader : public mojo::ResourceReturner {
frame->passes.push_back(pass.Pass());
- surface_->SubmitFrame(local_id_, frame.Pass(), mojo::Closure());
+ surface_->SubmitCompositorFrame(local_id_, frame.Pass(), mojo::Closure());
}
uint32_t BindTextureForSize(const mojo::Size size) {
diff --git a/components/view_manager/display_manager.cc b/components/view_manager/display_manager.cc
index f857f5b..8c18fb7 100644
--- a/components/view_manager/display_manager.cc
+++ b/components/view_manager/display_manager.cc
@@ -214,7 +214,7 @@ void DefaultDisplayManager::Draw() {
frame->delegated_frame_data = frame_data.Pass();
frame_pending_ = true;
if (top_level_display_client_) {
- top_level_display_client_->SubmitFrame(
+ top_level_display_client_->SubmitCompositorFrame(
frame.Pass(),
base::Bind(&DefaultDisplayManager::DidDraw, base::Unretained(this)));
}
diff --git a/components/view_manager/public/interfaces/surfaces.mojom b/components/view_manager/public/interfaces/surfaces.mojom
index 583821c..4ec94af 100644
--- a/components/view_manager/public/interfaces/surfaces.mojom
+++ b/components/view_manager/public/interfaces/surfaces.mojom
@@ -33,8 +33,8 @@ interface Surface {
CreateSurface(uint32 id_local);
// After the submitted frame is drawn for the first time, the surface will
- // respond to the SubmitFrame message. Clients should use this acknowledgement
- // to ratelimit frame submissions.
- SubmitFrame(uint32 id_local, CompositorFrame frame) => ();
+ // respond to the SubmitCompositorFrame message. Clients should use this
+ // acknowledgement to ratelimit frame submissions.
+ SubmitCompositorFrame(uint32 id_local, CompositorFrame frame) => ();
DestroySurface(uint32 id_local);
};
diff --git a/components/view_manager/surfaces/surfaces_impl.cc b/components/view_manager/surfaces/surfaces_impl.cc
index b32f3ca..1b37ecb4 100644
--- a/components/view_manager/surfaces/surfaces_impl.cc
+++ b/components/view_manager/surfaces/surfaces_impl.cc
@@ -57,13 +57,13 @@ void SurfacesImpl::CreateSurface(uint32_t local_id) {
factory_.Create(QualifyIdentifier(local_id));
}
-void SurfacesImpl::SubmitFrame(uint32_t local_id,
- mojo::CompositorFramePtr frame,
- const mojo::Closure& callback) {
- TRACE_EVENT0("mojo", "SurfacesImpl::SubmitFrame");
- factory_.SubmitFrame(QualifyIdentifier(local_id),
- frame.To<scoped_ptr<cc::CompositorFrame>>(),
- base::Bind(&CallCallback, callback));
+void SurfacesImpl::SubmitCompositorFrame(uint32_t local_id,
+ mojo::CompositorFramePtr frame,
+ const mojo::Closure& callback) {
+ TRACE_EVENT0("mojo", "SurfacesImpl::SubmitCompositorFrame");
+ factory_.SubmitCompositorFrame(QualifyIdentifier(local_id),
+ frame.To<scoped_ptr<cc::CompositorFrame>>(),
+ base::Bind(&CallCallback, callback));
state_->scheduler()->SetNeedsDraw();
}
diff --git a/components/view_manager/surfaces/surfaces_impl.h b/components/view_manager/surfaces/surfaces_impl.h
index e043c5c..b122602 100644
--- a/components/view_manager/surfaces/surfaces_impl.h
+++ b/components/view_manager/surfaces/surfaces_impl.h
@@ -40,9 +40,9 @@ class SurfacesImpl : public mojo::Surface, public cc::SurfaceFactoryClient {
void GetIdNamespace(const Surface::GetIdNamespaceCallback& callback) override;
void SetResourceReturner(mojo::ResourceReturnerPtr returner) override;
void CreateSurface(uint32_t local_id) override;
- void SubmitFrame(uint32_t local_id,
- mojo::CompositorFramePtr frame,
- const mojo::Closure& callback) override;
+ void SubmitCompositorFrame(uint32_t local_id,
+ mojo::CompositorFramePtr frame,
+ const mojo::Closure& callback) override;
void DestroySurface(uint32_t local_id) override;
// SurfaceFactoryClient implementation.
diff --git a/components/view_manager/surfaces/top_level_display_client.cc b/components/view_manager/surfaces/top_level_display_client.cc
index 251a3eb..378a37f 100644
--- a/components/view_manager/surfaces/top_level_display_client.cc
+++ b/components/view_manager/surfaces/top_level_display_client.cc
@@ -59,8 +59,9 @@ TopLevelDisplayClient::~TopLevelDisplayClient() {
}
}
-void TopLevelDisplayClient::SubmitFrame(scoped_ptr<cc::CompositorFrame> frame,
- const base::Closure& callback) {
+void TopLevelDisplayClient::SubmitCompositorFrame(
+ scoped_ptr<cc::CompositorFrame> frame,
+ const base::Closure& callback) {
DCHECK(pending_callback_.is_null());
pending_frame_ = frame.Pass();
pending_callback_ = callback;
@@ -74,9 +75,8 @@ void TopLevelDisplayClient::Draw() {
output_rect.size();
last_submitted_frame_size_ = frame_size;
display_->Resize(frame_size);
- factory_.SubmitFrame(cc_id_,
- pending_frame_.Pass(),
- base::Bind(&CallCallback, pending_callback_));
+ factory_.SubmitCompositorFrame(cc_id_, pending_frame_.Pass(),
+ base::Bind(&CallCallback, pending_callback_));
surfaces_state_->scheduler()->SetNeedsDraw();
pending_callback_.Reset();
}
diff --git a/components/view_manager/surfaces/top_level_display_client.h b/components/view_manager/surfaces/top_level_display_client.h
index e157eb1..c1a70f2 100644
--- a/components/view_manager/surfaces/top_level_display_client.h
+++ b/components/view_manager/surfaces/top_level_display_client.h
@@ -44,8 +44,8 @@ class TopLevelDisplayClient
const scoped_refptr<SurfacesState>& surfaces_state);
~TopLevelDisplayClient() override;
- void SubmitFrame(scoped_ptr<cc::CompositorFrame> frame,
- const base::Closure& callback);
+ void SubmitCompositorFrame(scoped_ptr<cc::CompositorFrame> frame,
+ const base::Closure& callback);
private:
// DisplayClient implementation.
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc
index b8a8ad4..444adb8 100644
--- a/content/browser/compositor/delegated_frame_host.cc
+++ b/content/browser/compositor/delegated_frame_host.cc
@@ -421,7 +421,7 @@ void DelegatedFrameHost::SwapDelegatedFrame(
ack_callback = base::Bind(&DelegatedFrameHost::SurfaceDrawn,
AsWeakPtr(), output_surface_id);
}
- surface_factory_->SubmitFrame(
+ surface_factory_->SubmitCompositorFrame(
surface_id_, compositor_frame.Pass(), ack_callback);
} else {
if (!resource_collection_.get()) {
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 823a3c4..67d70ab 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -292,7 +292,8 @@ void RenderWidgetHostViewChildFrame::OnSwapCompositorFrame(
ack_pending_count_++;
// If this value grows very large, something is going wrong.
DCHECK(ack_pending_count_ < 1000);
- surface_factory_->SubmitFrame(surface_id_, frame.Pass(), ack_callback);
+ surface_factory_->SubmitCompositorFrame(surface_id_, frame.Pass(),
+ ack_callback);
}
void RenderWidgetHostViewChildFrame::GetScreenInfo(
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index f5a04c4c..dc6789f 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -273,7 +273,8 @@ void RenderWidgetHostViewGuest::OnSwapCompositorFrame(
ack_pending_count_++;
// If this value grows very large, something is going wrong.
DCHECK(ack_pending_count_ < 1000);
- surface_factory_->SubmitFrame(surface_id_, frame.Pass(), ack_callback);
+ surface_factory_->SubmitCompositorFrame(surface_id_, frame.Pass(),
+ ack_callback);
}
bool RenderWidgetHostViewGuest::OnMessageReceived(const IPC::Message& msg) {
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 605bb9b..177da7f 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -1017,7 +1017,7 @@ void RenderWidgetHostViewAndroid::CheckOutputSurfaceChanged(
last_output_surface_id_ = output_surface_id;
}
-void RenderWidgetHostViewAndroid::SubmitFrame(
+void RenderWidgetHostViewAndroid::SubmitCompositorFrame(
scoped_ptr<cc::CompositorFrame> frame) {
cc::SurfaceManager* manager = CompositorImpl::GetSurfaceManager();
if (manager) {
@@ -1042,7 +1042,8 @@ void RenderWidgetHostViewAndroid::SubmitFrame(
cc::SurfaceFactory::DrawCallback ack_callback =
base::Bind(&RenderWidgetHostViewAndroid::RunAckCallbacks,
weak_ptr_factory_.GetWeakPtr());
- surface_factory_->SubmitFrame(surface_id_, frame.Pass(), ack_callback);
+ surface_factory_->SubmitCompositorFrame(surface_id_, frame.Pass(),
+ ack_callback);
} else {
if (!resource_collection_.get()) {
resource_collection_ = new cc::DelegatedFrameResourceCollection;
@@ -1086,7 +1087,7 @@ void RenderWidgetHostViewAndroid::SwapDelegatedFrame(
if (!has_content) {
DestroyDelegatedContent();
} else {
- SubmitFrame(frame.Pass());
+ SubmitCompositorFrame(frame.Pass());
}
if (layer_.get()) {
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index 982da1c..85541f4 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -260,7 +260,7 @@ class CONTENT_EXPORT RenderWidgetHostViewAndroid
void DestroyDelegatedContent();
void CheckOutputSurfaceChanged(uint32 output_surface_id);
- void SubmitFrame(scoped_ptr<cc::CompositorFrame> frame_data);
+ void SubmitCompositorFrame(scoped_ptr<cc::CompositorFrame> frame_data);
void SwapDelegatedFrame(uint32 output_surface_id,
scoped_ptr<cc::CompositorFrame> frame_data);
void SendDelegatedFrameAck(uint32 output_surface_id);
diff --git a/mandoline/ui/aura/surface_binding.cc b/mandoline/ui/aura/surface_binding.cc
index 0307112..c259d5c 100644
--- a/mandoline/ui/aura/surface_binding.cc
+++ b/mandoline/ui/aura/surface_binding.cc
@@ -89,9 +89,8 @@ void OutputSurfaceImpl::SwapBuffers(cc::CompositorFrame* frame) {
surface_size_ = frame_size;
}
- surface_->SubmitFrame(local_id_,
- mojo::CompositorFrame::From(*frame),
- mojo::Closure());
+ surface_->SubmitCompositorFrame(
+ local_id_, mojo::CompositorFrame::From(*frame), mojo::Closure());
client_->DidSwapBuffers();
client_->DidSwapBuffersComplete();
diff --git a/mojo/cc/output_surface_mojo.cc b/mojo/cc/output_surface_mojo.cc
index 5dbdde1..b202b3b 100644
--- a/mojo/cc/output_surface_mojo.cc
+++ b/mojo/cc/output_surface_mojo.cc
@@ -61,9 +61,8 @@ void OutputSurfaceMojo::SwapBuffers(cc::CompositorFrame* frame) {
surface_size_ = frame_size;
}
- surface_->SubmitFrame(local_id_,
- CompositorFrame::From(*frame),
- mojo::Closure());
+ surface_->SubmitCompositorFrame(local_id_, CompositorFrame::From(*frame),
+ mojo::Closure());
client_->DidSwapBuffers();
client_->DidSwapBuffersComplete();