Commit d80abf59 authored by Adrienne Walker's avatar Adrienne Walker Committed by Commit Bot

cc: fix paint op perf tests

After the client/service paint cache entries were added, these tests
started failing.  Fix this by clearing the client paint cache on every
iteration so that each op has to always serialize cached subtypes.

Change-Id: I7dfae5b5ae34864f77ae1fb28793b1ab2db94c86
Reviewed-on: https://chromium-review.googlesource.com/c/1343502Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Commit-Queue: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609550}
parent 56de02ff
......@@ -60,6 +60,9 @@ class PaintOpPerfTest : public testing::Test {
test_options_provider.max_texture_bytes());
serializer.Serialize(&buffer, nullptr, preamble);
bytes_written = serializer.written();
// Force client paint cache entries to be written every time.
test_options_provider.client_paint_cache()->PurgeAll();
timer_.NextLap();
} while (!timer_.HasTimeLimitExpired());
CHECK_GT(bytes_written, 0u);
......@@ -81,6 +84,7 @@ class PaintOpPerfTest : public testing::Test {
to_read, remaining_read_bytes, deserialized_data_.get(),
sizeof(LargestPaintOp), &bytes_read,
test_options_provider.deserialize_options());
CHECK(deserialized_op);
deserialized_op->DestroyThis();
DCHECK_GE(remaining_read_bytes, bytes_read);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment