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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h

Issue 2264253003: Command buffers: ensure we only read immediate data once (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
index 48c0bef5e2791215e44370812d8b883f1fbf15cc..41409dc3db169849c643c8250b1c007b2601d6b9 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
@@ -70,11 +70,6 @@ class GLES2DecoderTestBase : public ::testing::TestWithParam<bool> {
return reinterpret_cast<T*>(immediate_buffer_);
}
- template <typename T, typename Command>
- T GetImmediateDataAs(Command* cmd) {
- return reinterpret_cast<T>(ImmediateDataAddress(cmd));
- }
-
void ClearSharedMemory() {
engine_->ClearSharedMemory();
}
@@ -771,6 +766,14 @@ class GLES2DecoderWithShaderTestBase : public GLES2DecoderTestBase {
template <>
void GLES2DecoderTestBase::SpecializedSetup<cmds::LinkProgram, 0>(bool valid);
+MATCHER_P2(PointsToArray, array, size, "") {
+ for (size_t i = 0; i < static_cast<size_t>(size); ++i) {
+ if (arg[i] != array[i])
+ return false;
+ }
+ return true;
+}
+
} // namespace gles2
} // namespace gpu

Powered by Google App Engine
This is Rietveld 408576698