diff options
author | Peiyong Lin <lpy@google.com> | 2020-01-08 14:54:02 -0800 |
---|---|---|
committer | Peiyong Lin <lpy@google.com> | 2020-01-08 14:55:20 -0800 |
commit | 96ee56bcd82b180c5cce959b29aa506d216ccbbe (patch) | |
tree | 010d5b85d9945815fa60003ced104fed41c0bed6 /graphics/composer/2.1/utils/command-buffer/include/composer-command-buffer | |
parent | bcad3114c962d294a002697bcf9d587334e0b00a (diff) |
Remove beginCommand variants with a helper template.
BUG: b/147365206
Test: boot
Change-Id: I30715fe3e1c221ba366bf521fbd531636136f0c9
Diffstat (limited to 'graphics/composer/2.1/utils/command-buffer/include/composer-command-buffer')
-rw-r--r-- | graphics/composer/2.1/utils/command-buffer/include/composer-command-buffer/2.1/ComposerCommandBuffer.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/graphics/composer/2.1/utils/command-buffer/include/composer-command-buffer/2.1/ComposerCommandBuffer.h b/graphics/composer/2.1/utils/command-buffer/include/composer-command-buffer/2.1/ComposerCommandBuffer.h index ebac2e0f58..64ed4f3c5a 100644 --- a/graphics/composer/2.1/utils/command-buffer/include/composer-command-buffer/2.1/ComposerCommandBuffer.h +++ b/graphics/composer/2.1/utils/command-buffer/include/composer-command-buffer/2.1/ComposerCommandBuffer.h @@ -403,6 +403,11 @@ class CommandWriterBase { } protected: + template <typename T> + void beginCommand(T command, uint16_t length) { + beginCommandBase(static_cast<IComposerClient::Command>(command), length); + } + void setClientTargetInternal(uint32_t slot, const native_handle_t* target, int acquireFence, int32_t dataspace, const std::vector<IComposerClient::Rect>& damage) { @@ -429,7 +434,7 @@ class CommandWriterBase { endCommand(); } - void beginCommand(IComposerClient::Command command, uint16_t length) { + void beginCommandBase(IComposerClient::Command command, uint16_t length) { if (mCommandEnd) { LOG_FATAL("endCommand was not called before command 0x%x", command); } |