Loading graphics/composer/2.2/utils/command-buffer/include/composer-command-buffer/2.2/ComposerCommandBuffer.h +2 −8 Original line number Diff line number Diff line Loading @@ -17,19 +17,13 @@ #pragma once #ifndef LOG_TAG #warn "ComposerCommandBuffer.h included without LOG_TAG" #warning "ComposerCommandBuffer.h included without LOG_TAG" #endif //#define LOG_NDEBUG 0 #include <algorithm> #include <limits> #include <memory> #include <vector> #include <inttypes.h> #include <string.h> #include <android/hardware/graphics/composer/2.2/IComposer.h> #include <android/hardware/graphics/composer/2.2/IComposerClient.h> #include <fmq/MessageQueue.h> Loading Loading @@ -82,7 +76,7 @@ class CommandWriterBase : public V2_1::CommandWriterBase { void setLayerPerFrameMetadata(const hidl_vec<IComposerClient::PerFrameMetadata>& metadataVec) { beginCommand(IComposerClient::Command::SET_LAYER_PER_FRAME_METADATA, metadataVec.size() * 2); static_cast<uint16_t>(metadataVec.size() * 2)); for (const auto& metadata : metadataVec) { writeSigned(static_cast<int32_t>(metadata.key)); writeFloat(metadata.value); Loading graphics/composer/2.3/utils/command-buffer/include/composer-command-buffer/2.3/ComposerCommandBuffer.h +2 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ #pragma once #ifndef LOG_TAG #warn "ComposerCommandBuffer.h included without LOG_TAG" #warning "ComposerCommandBuffer.h included without LOG_TAG" #endif //#define LOG_NDEBUG 0 Loading Loading @@ -46,7 +46,7 @@ class CommandWriterBase : public V2_2::CommandWriterBase { public: void setLayerPerFrameMetadata(const hidl_vec<IComposerClient::PerFrameMetadata>& metadataVec) { beginCommand(IComposerClient::Command::SET_LAYER_PER_FRAME_METADATA, metadataVec.size() * 2); static_cast<uint16_t>(metadataVec.size() * 2)); for (const auto& metadata : metadataVec) { writeSigned(static_cast<int32_t>(metadata.key)); writeFloat(metadata.value); Loading graphics/composer/2.4/utils/command-buffer/include/composer-command-buffer/2.4/ComposerCommandBuffer.h +7 −6 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ #pragma once #ifndef LOG_TAG #warn "ComposerCommandBuffer.h included without LOG_TAG" #warning "ComposerCommandBuffer.h included without LOG_TAG" #endif //#define LOG_NDEBUG 0 Loading Loading @@ -63,16 +63,17 @@ class CommandWriterBase : public V2_3::CommandWriterBase { beginCommand(IComposerClient::Command::SET_LAYER_GENERIC_METADATA, static_cast<uint16_t>(commandSize)); write(key.size()); writeBlob(key.size(), reinterpret_cast<const unsigned char*>(key.c_str())); write(static_cast<uint32_t>(key.size())); writeBlob(static_cast<uint32_t>(key.size()), reinterpret_cast<const unsigned char*>(key.c_str())); write(mandatory); write(value.size()); writeBlob(value.size(), value.data()); write(static_cast<uint32_t>(value.size())); writeBlob(static_cast<uint32_t>(value.size()), value.data()); endCommand(); } protected: uint32_t sizeToElements(uint32_t size) { return (size + 3) / 4; } uint32_t sizeToElements(size_t size) { return static_cast<uint32_t>((size + 3) / 4); } }; // This class helps parse a command queue. Note that all sizes/lengths are in Loading Loading
graphics/composer/2.2/utils/command-buffer/include/composer-command-buffer/2.2/ComposerCommandBuffer.h +2 −8 Original line number Diff line number Diff line Loading @@ -17,19 +17,13 @@ #pragma once #ifndef LOG_TAG #warn "ComposerCommandBuffer.h included without LOG_TAG" #warning "ComposerCommandBuffer.h included without LOG_TAG" #endif //#define LOG_NDEBUG 0 #include <algorithm> #include <limits> #include <memory> #include <vector> #include <inttypes.h> #include <string.h> #include <android/hardware/graphics/composer/2.2/IComposer.h> #include <android/hardware/graphics/composer/2.2/IComposerClient.h> #include <fmq/MessageQueue.h> Loading Loading @@ -82,7 +76,7 @@ class CommandWriterBase : public V2_1::CommandWriterBase { void setLayerPerFrameMetadata(const hidl_vec<IComposerClient::PerFrameMetadata>& metadataVec) { beginCommand(IComposerClient::Command::SET_LAYER_PER_FRAME_METADATA, metadataVec.size() * 2); static_cast<uint16_t>(metadataVec.size() * 2)); for (const auto& metadata : metadataVec) { writeSigned(static_cast<int32_t>(metadata.key)); writeFloat(metadata.value); Loading
graphics/composer/2.3/utils/command-buffer/include/composer-command-buffer/2.3/ComposerCommandBuffer.h +2 −2 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ #pragma once #ifndef LOG_TAG #warn "ComposerCommandBuffer.h included without LOG_TAG" #warning "ComposerCommandBuffer.h included without LOG_TAG" #endif //#define LOG_NDEBUG 0 Loading Loading @@ -46,7 +46,7 @@ class CommandWriterBase : public V2_2::CommandWriterBase { public: void setLayerPerFrameMetadata(const hidl_vec<IComposerClient::PerFrameMetadata>& metadataVec) { beginCommand(IComposerClient::Command::SET_LAYER_PER_FRAME_METADATA, metadataVec.size() * 2); static_cast<uint16_t>(metadataVec.size() * 2)); for (const auto& metadata : metadataVec) { writeSigned(static_cast<int32_t>(metadata.key)); writeFloat(metadata.value); Loading
graphics/composer/2.4/utils/command-buffer/include/composer-command-buffer/2.4/ComposerCommandBuffer.h +7 −6 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ #pragma once #ifndef LOG_TAG #warn "ComposerCommandBuffer.h included without LOG_TAG" #warning "ComposerCommandBuffer.h included without LOG_TAG" #endif //#define LOG_NDEBUG 0 Loading Loading @@ -63,16 +63,17 @@ class CommandWriterBase : public V2_3::CommandWriterBase { beginCommand(IComposerClient::Command::SET_LAYER_GENERIC_METADATA, static_cast<uint16_t>(commandSize)); write(key.size()); writeBlob(key.size(), reinterpret_cast<const unsigned char*>(key.c_str())); write(static_cast<uint32_t>(key.size())); writeBlob(static_cast<uint32_t>(key.size()), reinterpret_cast<const unsigned char*>(key.c_str())); write(mandatory); write(value.size()); writeBlob(value.size(), value.data()); write(static_cast<uint32_t>(value.size())); writeBlob(static_cast<uint32_t>(value.size()), value.data()); endCommand(); } protected: uint32_t sizeToElements(uint32_t size) { return (size + 3) / 4; } uint32_t sizeToElements(size_t size) { return static_cast<uint32_t>((size + 3) / 4); } }; // This class helps parse a command queue. Note that all sizes/lengths are in Loading