Skip to content

Commit

Permalink
Fix cc_perf_tests compositor frame deserialization
Browse files Browse the repository at this point in the history
Deserialization became very fast because deserializing was failing.

The compositor frames don't successfully deserialize because they don't
set the begin frame ack correctly.  Fix this, and then CHECK that the
deserialization succeeds.

Bug: 725153
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iacd559fc91345bb3520af56426384f4c052ade7f
Reviewed-on: https://chromium-review.googlesource.com/679695
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503876}
  • Loading branch information
quisquous authored and Commit Bot committed Sep 22, 2017
1 parent 70874e0 commit f455893
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cc/ipc/cc_serialization_perftest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ enum class UseSingleSharedQuadState { YES, NO };

class CCSerializationPerfTest : public testing::Test {
protected:
static bool ReadMessage(const IPC::Message* msg, CompositorFrame* frame) {
static void ReadMessage(const IPC::Message* msg, CompositorFrame* frame) {
base::PickleIterator iter(*msg);
return IPC::ParamTraits<CompositorFrame>::Read(msg, &iter, frame);
bool success = IPC::ParamTraits<CompositorFrame>::Read(msg, &iter, frame);
CHECK(success);
}

static void RunDeserializationTestParamTraits(
Expand Down Expand Up @@ -230,6 +231,7 @@ class CCSerializationPerfTest : public testing::Test {

static void RunComplexCompositorFrameTest(const std::string& test_name) {
CompositorFrame frame;
frame.metadata.begin_frame_ack = viz::BeginFrameAck(0, 1, true);

std::vector<viz::TransferableResource>& resource_list = frame.resource_list;
for (uint32_t i = 0; i < 80; ++i) {
Expand Down Expand Up @@ -396,6 +398,7 @@ class CCSerializationPerfTest : public testing::Test {
uint32_t num_passes,
UseSingleSharedQuadState single_sqs) {
CompositorFrame frame;
frame.metadata.begin_frame_ack = viz::BeginFrameAck(0, 1, true);

for (uint32_t i = 0; i < num_passes; ++i) {
std::unique_ptr<viz::RenderPass> render_pass = viz::RenderPass::Create();
Expand Down

0 comments on commit f455893

Please sign in to comment.