From a5aedc3293c7ac3d151d07d95966388e3949ffd3 Mon Sep 17 00:00:00 2001 From: Peiyong Lin Date: Mon, 25 Nov 2019 16:17:52 -0800 Subject: [PATCH] Clean up BeginCommand. BUG: N/A Test: build, flash and boot Change-Id: Ife6132307152e271548a54e11a472751c52d95e4 --- .../2.2/ComposerCommandBuffer.h | 11 ++++++----- .../2.3/ComposerCommandBuffer.h | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/graphics/composer/2.2/utils/command-buffer/include/composer-command-buffer/2.2/ComposerCommandBuffer.h b/graphics/composer/2.2/utils/command-buffer/include/composer-command-buffer/2.2/ComposerCommandBuffer.h index 138d70005e..35162a6b8e 100644 --- a/graphics/composer/2.2/utils/command-buffer/include/composer-command-buffer/2.2/ComposerCommandBuffer.h +++ b/graphics/composer/2.2/utils/command-buffer/include/composer-command-buffer/2.2/ComposerCommandBuffer.h @@ -93,17 +93,18 @@ class CommandWriterBase : public V2_1::CommandWriterBase { } protected: - void beginCommand_2_2(IComposerClient::Command command, uint16_t length) { - V2_1::CommandWriterBase::beginCommand( - static_cast(static_cast(command)), length); - } - void writeFloatColor(const IComposerClient::FloatColor& color) { writeFloat(color.r); writeFloat(color.g); writeFloat(color.b); writeFloat(color.a); } + + private: + void beginCommand_2_2(IComposerClient::Command command, uint16_t length) { + V2_1::CommandWriterBase::beginCommand( + static_cast(static_cast(command)), length); + } }; // This class helps parse a command queue. Note that all sizes/lengths are in diff --git a/graphics/composer/2.3/utils/command-buffer/include/composer-command-buffer/2.3/ComposerCommandBuffer.h b/graphics/composer/2.3/utils/command-buffer/include/composer-command-buffer/2.3/ComposerCommandBuffer.h index 11863faced..162915e9a0 100644 --- a/graphics/composer/2.3/utils/command-buffer/include/composer-command-buffer/2.3/ComposerCommandBuffer.h +++ b/graphics/composer/2.3/utils/command-buffer/include/composer-command-buffer/2.3/ComposerCommandBuffer.h @@ -119,17 +119,18 @@ class CommandWriterBase : public V2_2::CommandWriterBase { } protected: - void beginCommand_2_3(IComposerClient::Command command, uint16_t length) { - V2_2::CommandWriterBase::beginCommand_2_2( - static_cast(static_cast(command)), length); - } - void writeBlob(uint32_t length, const unsigned char* blob) { memcpy(&mData[mDataWritten], blob, length); uint32_t numElements = length / 4; mDataWritten += numElements; mDataWritten += (length - (numElements * 4) > 0) ? 1 : 0; } + + private: + void beginCommand_2_3(IComposerClient::Command command, uint16_t length) { + V2_1::CommandWriterBase::beginCommand( + static_cast(static_cast(command)), length); + } }; // This class helps parse a command queue. Note that all sizes/lengths are in