Skip to content

Commit

Permalink
Introduce DecoderPerfTest
Browse files Browse the repository at this point in the history
This is a microbenchmark that measures the raw throughput of the GLES2 decoders.

Bug: 775212
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ic701af8c5e83a5eee347f481ee5319dfa6fc0ffc
Reviewed-on: https://chromium-review.googlesource.com/719462
Commit-Queue: Antoine Labour <piman@chromium.org>
Reviewed-by: Victor Miura <vmiura@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509270}
  • Loading branch information
pimanttr authored and Commit Bot committed Oct 17, 2017
1 parent 4a917c6 commit 739de36
Show file tree
Hide file tree
Showing 6 changed files with 768 additions and 13 deletions.
33 changes: 32 additions & 1 deletion gpu/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,10 @@ test("gpu_perftests") {
]

deps = [
":gpu",
"//base",
"//base/test:test_support",
"//gpu/command_buffer/service",
"//gpu/command_buffer/client:gles2_implementation",
"//testing/gmock",
"//testing/gtest",
"//testing/perf",
Expand All @@ -425,6 +426,36 @@ test("gpu_perftests") {
assert_no_deps = [ "//chrome" ]
}

test("command_buffer_perftests") {
sources = [
"command_buffer/tests/decoder_perftest.cc",
"perftests/run_all_tests.cc",
]

deps = [
":gpu",
"//base",
"//base/test:test_support",
"//gpu/command_buffer/client:gles2_implementation",
"//testing/gtest",
"//testing/perf",
"//ui/gfx/geometry",
"//ui/gl",
"//ui/gl/init",
]

data = [
# Needed for isolate script to execute.
"//testing/scripts/common.py",
"//testing/xvfb.py",
"//testing/scripts/run_gtest_perf_test.py",
"//tools/perf/generate_legacy_perf_dashboard_json.py",
]

# This target should not require the Chrome executable to run.
assert_no_deps = [ "//chrome" ]
}

fuzzer_test("gpu_fuzzer") {
sources = [
"command_buffer/tests/fuzzer_main.cc",
Expand Down
4 changes: 4 additions & 0 deletions gpu/command_buffer/service/command_buffer_direct.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ class GPU_EXPORT CommandBufferDirect : public CommandBuffer,

scoped_refptr<Buffer> CreateTransferBufferWithId(size_t size, int32_t id);

void SetGetOffsetForTest(int32_t get_offset) {
service_.SetGetOffsetForTest(get_offset);
}

private:
CommandBufferService service_;
SyncPointManager* sync_point_manager_;
Expand Down
4 changes: 4 additions & 0 deletions gpu/command_buffer/service/command_buffer_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ class GPU_EXPORT CommandBufferService : public CommandBufferServiceBase {

int32_t put_offset() const { return put_offset_; }

void SetGetOffsetForTest(int32_t get_offset) {
state_.get_offset = get_offset;
}

private:
CommandBufferServiceClient* client_;
TransferBufferManager* transfer_buffer_manager_;
Expand Down
Loading

0 comments on commit 739de36

Please sign in to comment.