Error createBufferDescriptor(
const IAllocatorClient::BufferDescriptorInfo& descriptorInfo,
- BufferDescriptor& descriptor) const;
+ BufferDescriptor* outDescriptor) const;
void destroyBufferDescriptor(BufferDescriptor descriptor) const;
- Error allocate(BufferDescriptor descriptor, Buffer& buffer) const;
+ Error allocate(BufferDescriptor descriptor, Buffer* outBuffer) const;
void free(Buffer buffer) const;
Error exportHandle(BufferDescriptor descriptor, Buffer buffer,
- native_handle_t*& bufferHandle) const;
+ native_handle_t** outBufferHandle) const;
private:
sp<IAllocator> mAllocator;
void release(buffer_handle_t handle) const;
Error getDimensions(buffer_handle_t handle,
- uint32_t& width, uint32_t& height) const
+ uint32_t* outWidth, uint32_t* outHeight) const
{
- return mMapper->getDimensions(mDevice, handle, &width, &height);
+ return mMapper->getDimensions(mDevice, handle, outWidth, outHeight);
}
Error getFormat(buffer_handle_t handle,
- PixelFormat& format) const
+ PixelFormat* outFormat) const
{
- return mMapper->getFormat(mDevice, handle, &format);
+ return mMapper->getFormat(mDevice, handle, outFormat);
}
- Error getLayerCount(buffer_handle_t handle, uint32_t& layerCount) const
+ Error getLayerCount(buffer_handle_t handle, uint32_t* outLayerCount) const
{
- return mMapper->getLayerCount(mDevice, handle, &layerCount);
+ return mMapper->getLayerCount(mDevice, handle, outLayerCount);
}
Error getProducerUsageMask(buffer_handle_t handle,
- uint64_t& usageMask) const
+ uint64_t* outUsageMask) const
{
- return mMapper->getProducerUsageMask(mDevice, handle, &usageMask);
+ return mMapper->getProducerUsageMask(mDevice, handle, outUsageMask);
}
Error getConsumerUsageMask(buffer_handle_t handle,
- uint64_t& usageMask) const
+ uint64_t* outUsageMask) const
{
- return mMapper->getConsumerUsageMask(mDevice, handle, &usageMask);
+ return mMapper->getConsumerUsageMask(mDevice, handle, outUsageMask);
}
Error getBackingStore(buffer_handle_t handle,
- BackingStore& store) const
+ BackingStore* outStore) const
{
- return mMapper->getBackingStore(mDevice, handle, &store);
+ return mMapper->getBackingStore(mDevice, handle, outStore);
}
- Error getStride(buffer_handle_t handle, uint32_t& stride) const
+ Error getStride(buffer_handle_t handle, uint32_t* outStride) const
{
- return mMapper->getStride(mDevice, handle, &stride);
+ return mMapper->getStride(mDevice, handle, outStride);
}
- Error getNumFlexPlanes(buffer_handle_t handle, uint32_t& numPlanes) const
+ Error getNumFlexPlanes(buffer_handle_t handle,
+ uint32_t* outNumPlanes) const
{
- return mMapper->getNumFlexPlanes(mDevice, handle, &numPlanes);
+ return mMapper->getNumFlexPlanes(mDevice, handle, outNumPlanes);
}
Error lock(buffer_handle_t handle,
uint64_t producerUsageMask,
uint64_t consumerUsageMask,
const Device::Rect& accessRegion,
- int acquireFence, void*& data) const
+ int acquireFence, void** outData) const
{
return mMapper->lock(mDevice, handle,
producerUsageMask, consumerUsageMask,
- &accessRegion, acquireFence, &data);
+ &accessRegion, acquireFence, outData);
}
Error lock(buffer_handle_t handle,
uint64_t producerUsageMask,
uint64_t consumerUsageMask,
const Device::Rect& accessRegion,
- int acquireFence, FlexLayout& flexLayout) const
+ int acquireFence, FlexLayout* outFlexLayout) const
{
return mMapper->lockFlex(mDevice, handle,
producerUsageMask, consumerUsageMask,
- &accessRegion, acquireFence, &flexLayout);
+ &accessRegion, acquireFence, outFlexLayout);
}
int unlock(buffer_handle_t handle) const;
Error Allocator::createBufferDescriptor(
const IAllocatorClient::BufferDescriptorInfo& descriptorInfo,
- BufferDescriptor& descriptor) const
+ BufferDescriptor* outDescriptor) const
{
Error error = kDefaultError;
mClient->createDescriptor(descriptorInfo,
return;
}
- descriptor = tmpDescriptor;
+ *outDescriptor = tmpDescriptor;
});
return error;
mClient->destroyDescriptor(descriptor);
}
-Error Allocator::allocate(BufferDescriptor descriptor, Buffer& buffer) const
+Error Allocator::allocate(BufferDescriptor descriptor,
+ Buffer* outBuffer) const
{
hardware::hidl_vec<BufferDescriptor> descriptors;
descriptors.setToExternal(&descriptor, 1);
return;
}
- buffer = tmpBuffers[0];
+ *outBuffer = tmpBuffers[0];
});
return error;
}
Error Allocator::exportHandle(BufferDescriptor descriptor, Buffer buffer,
- native_handle_t*& bufferHandle) const
+ native_handle_t** outBufferHandle) const
{
Error error = kDefaultError;
auto status = mClient->exportHandle(descriptor, buffer,
return;
}
- bufferHandle = native_handle_clone(tmpBufferHandle);
- if (!bufferHandle) {
+ *outBufferHandle = native_handle_clone(tmpBufferHandle);
+ if (!*outBufferHandle) {
error = Error::NO_RESOURCES;
}
});
info.consumerUsageMask = usage;
Gralloc2::BufferDescriptor descriptor;
- auto error = mAllocator->createBufferDescriptor(info, descriptor);
+ auto error = mAllocator->createBufferDescriptor(info, &descriptor);
if (error != Gralloc2::Error::NONE) {
ALOGE("Failed to create desc (%u x %u) layerCount %u format %d usage %u: %d",
width, height, layerCount, format, usage, error);
return;
}
- error = mAllocator->allocate(descriptor, mBuffer);
+ error = mAllocator->allocate(descriptor, &mBuffer);
if (error == Gralloc2::Error::NOT_SHARED) {
error = Gralloc2::Error::NONE;
}
return;
}
- error = mAllocator->exportHandle(descriptor, mBuffer, mHandle);
+ error = mAllocator->exportHandle(descriptor, mBuffer, &mHandle);
if (error != Gralloc2::Error::NONE) {
ALOGE("Failed to export handle");
mAllocator->free(mBuffer);
*handle = mHandle;
- auto error = mapper.getGrallocMapper().getStride(mHandle, *stride);
+ auto error = mapper.getGrallocMapper().getStride(mHandle, stride);
if (error != Gralloc2::Error::NONE) {
ALOGW("Failed to get stride from buffer: %d", error);
*stride = 0;
const Gralloc2::Device::Rect& accessRect =
*reinterpret_cast<Gralloc2::Device::Rect*>(&accessRegion);
error = static_cast<gralloc1_error_t>(mMapper->lock(
- handle, usage, usage, accessRect, fenceFd, *vaddr));
+ handle, usage, usage, accessRect, fenceFd, vaddr));
} else {
sp<Fence> fence = new Fence(fenceFd);
error = mDevice->lock(handle,
gralloc1_error_t error;
if (mMapper->valid()) {
error = static_cast<gralloc1_error_t>(
- mMapper->getNumFlexPlanes(handle, numPlanes));
+ mMapper->getNumFlexPlanes(handle, &numPlanes));
} else {
error = mDevice->getNumFlexPlanes(handle, &numPlanes);
}
Gralloc2::FlexLayout& layout =
*reinterpret_cast<Gralloc2::FlexLayout*>(&flexLayout);
error = static_cast<gralloc1_error_t>(mMapper->lock(
- handle, usage, usage, accessRect, fenceFd, layout));
+ handle, usage, usage, accessRect, fenceFd, &layout));
} else {
sp<Fence> fence = new Fence(fenceFd);
error = mDevice->lockFlex(handle,
return unwrapRet(ret, kDefaultError);
}
-template<typename T>
-void assignFromHidlVec(std::vector<T>& vec, const hidl_vec<T>& data)
-{
- vec.clear();
- vec.insert(vec.begin(), &data[0], &data[data.size()]);
-}
-
} // anonymous namespace
Composer::Composer()
std::vector<IComposer::Capability> capabilities;
mComposer->getCapabilities(
[&](const auto& tmpCapabilities) {
- assignFromHidlVec(capabilities, tmpCapabilities);
+ capabilities = tmpCapabilities;
});
return capabilities;
}
Error Composer::createVirtualDisplay(uint32_t width, uint32_t height,
- PixelFormat& format, Display& display)
+ PixelFormat* format, Display* outDisplay)
{
const uint32_t bufferSlotCount = 1;
Error error = kDefaultError;
- mClient->createVirtualDisplay(width, height, format, bufferSlotCount,
+ mClient->createVirtualDisplay(width, height, *format, bufferSlotCount,
[&](const auto& tmpError, const auto& tmpDisplay,
const auto& tmpFormat) {
error = tmpError;
return;
}
- display = tmpDisplay;
- format = tmpFormat;
+ *outDisplay = tmpDisplay;
+ *format = tmpFormat;
});
return error;
return Error::NONE;
}
-Error Composer::createLayer(Display display, Layer& layer)
+Error Composer::createLayer(Display display, Layer* outLayer)
{
const uint32_t bufferSlotCount = 1;
Error error = kDefaultError;
return;
}
- layer = tmpLayer;
+ *outLayer = tmpLayer;
});
return error;
return unwrapRet(ret);
}
-Error Composer::getActiveConfig(Display display, Config& config)
+Error Composer::getActiveConfig(Display display, Config* outConfig)
{
Error error = kDefaultError;
mClient->getActiveConfig(display,
return;
}
- config = tmpConfig;
+ *outConfig = tmpConfig;
});
return error;
}
Error Composer::getChangedCompositionTypes(Display display,
- std::vector<Layer>& layers,
- std::vector<IComposerClient::Composition>& types)
+ std::vector<Layer>* outLayers,
+ std::vector<IComposerClient::Composition>* outTypes)
{
- mReader.takeChangedCompositionTypes(display, layers, types);
+ mReader.takeChangedCompositionTypes(display, outLayers, outTypes);
return Error::NONE;
}
Error Composer::getColorModes(Display display,
- std::vector<ColorMode>& modes)
+ std::vector<ColorMode>* outModes)
{
Error error = kDefaultError;
mClient->getColorModes(display,
return;
}
- assignFromHidlVec(modes, tmpModes);
+ *outModes = tmpModes;
});
return error;
}
Error Composer::getDisplayAttribute(Display display, Config config,
- IComposerClient::Attribute attribute, int32_t& value)
+ IComposerClient::Attribute attribute, int32_t* outValue)
{
Error error = kDefaultError;
mClient->getDisplayAttribute(display, config, attribute,
return;
}
- value = tmpValue;
+ *outValue = tmpValue;
});
return error;
}
Error Composer::getDisplayConfigs(Display display,
- std::vector<Config>& configs)
+ std::vector<Config>* outConfigs)
{
Error error = kDefaultError;
mClient->getDisplayConfigs(display,
return;
}
- assignFromHidlVec(configs, tmpConfigs);
+ *outConfigs = tmpConfigs;
});
return error;
}
-Error Composer::getDisplayName(Display display, std::string& name)
+Error Composer::getDisplayName(Display display, std::string* outName)
{
Error error = kDefaultError;
mClient->getDisplayName(display,
return;
}
- name = tmpName.c_str();
+ *outName = tmpName.c_str();
});
return error;
}
Error Composer::getDisplayRequests(Display display,
- uint32_t& displayRequestMask, std::vector<Layer>& layers,
- std::vector<uint32_t>& layerRequestMasks)
+ uint32_t* outDisplayRequestMask, std::vector<Layer>* outLayers,
+ std::vector<uint32_t>* outLayerRequestMasks)
{
- mReader.takeDisplayRequests(display, displayRequestMask,
- layers, layerRequestMasks);
+ mReader.takeDisplayRequests(display, outDisplayRequestMask,
+ outLayers, outLayerRequestMasks);
return Error::NONE;
}
-Error Composer::getDisplayType(Display display, IComposerClient::DisplayType& type)
+Error Composer::getDisplayType(Display display,
+ IComposerClient::DisplayType* outType)
{
Error error = kDefaultError;
mClient->getDisplayType(display,
return;
}
- type = tmpType;
+ *outType = tmpType;
});
return error;
}
-Error Composer::getDozeSupport(Display display, bool& support)
+Error Composer::getDozeSupport(Display display, bool* outSupport)
{
Error error = kDefaultError;
mClient->getDozeSupport(display,
return;
}
- support = tmpSupport;
+ *outSupport = tmpSupport;
});
return error;
}
-Error Composer::getHdrCapabilities(Display display, std::vector<Hdr>& types,
- float& maxLuminance, float& maxAverageLuminance,
- float& minLuminance)
+Error Composer::getHdrCapabilities(Display display,
+ std::vector<Hdr>* outTypes, float* outMaxLuminance,
+ float* outMaxAverageLuminance, float* outMinLuminance)
{
Error error = kDefaultError;
mClient->getHdrCapabilities(display,
return;
}
- assignFromHidlVec(types, tmpTypes);
- maxLuminance = tmpMaxLuminance;
- maxAverageLuminance = tmpMaxAverageLuminance;
- minLuminance = tmpMinLuminance;
+ *outTypes = tmpTypes;
+ *outMaxLuminance = tmpMaxLuminance;
+ *outMaxAverageLuminance = tmpMaxAverageLuminance;
+ *outMinLuminance = tmpMinLuminance;
});
return error;
}
-Error Composer::getReleaseFences(Display display, std::vector<Layer>& layers,
- std::vector<int>& releaseFences)
+Error Composer::getReleaseFences(Display display,
+ std::vector<Layer>* outLayers, std::vector<int>* outReleaseFences)
{
- mReader.takeReleaseFences(display, layers, releaseFences);
+ mReader.takeReleaseFences(display, outLayers, outReleaseFences);
return Error::NONE;
}
-Error Composer::presentDisplay(Display display, int& presentFence)
+Error Composer::presentDisplay(Display display, int* outPresentFence)
{
mWriter.selectDisplay(display);
mWriter.presentDisplay();
return error;
}
- mReader.takePresentFence(display, presentFence);
+ mReader.takePresentFence(display, outPresentFence);
return Error::NONE;
}
return unwrapRet(ret);
}
-Error Composer::validateDisplay(Display display, uint32_t& numTypes,
- uint32_t& numRequests)
+Error Composer::validateDisplay(Display display, uint32_t* outNumTypes,
+ uint32_t* outNumRequests)
{
mWriter.selectDisplay(display);
mWriter.validateDisplay();
return error;
}
- mReader.hasChanges(display, numTypes, numRequests);
+ mReader.hasChanges(display, outNumTypes, outNumRequests);
return Error::NONE;
}
bool queueChanged = false;
uint32_t commandLength = 0;
hidl_vec<hidl_handle> commandHandles;
- if (!mWriter.writeQueue(queueChanged, commandLength, commandHandles)) {
+ if (!mWriter.writeQueue(&queueChanged, &commandLength, &commandHandles)) {
mWriter.reset();
return Error::NO_RESOURCES;
}
uint16_t length = 0;
while (!isEmpty()) {
- if (!beginCommand(command, length)) {
+ if (!beginCommand(&command, &length)) {
break;
}
}
bool CommandReader::hasChanges(Display display,
- uint32_t& numChangedCompositionTypes,
- uint32_t& numLayerRequestMasks) const
+ uint32_t* outNumChangedCompositionTypes,
+ uint32_t* outNumLayerRequestMasks) const
{
auto found = mReturnData.find(display);
if (found == mReturnData.end()) {
- numChangedCompositionTypes = 0;
- numLayerRequestMasks = 0;
+ *outNumChangedCompositionTypes = 0;
+ *outNumLayerRequestMasks = 0;
return false;
}
const ReturnData& data = found->second;
- numChangedCompositionTypes = data.compositionTypes.size();
- numLayerRequestMasks = data.requestMasks.size();
+ *outNumChangedCompositionTypes = data.compositionTypes.size();
+ *outNumLayerRequestMasks = data.requestMasks.size();
return !(data.compositionTypes.empty() && data.requestMasks.empty());
}
void CommandReader::takeChangedCompositionTypes(Display display,
- std::vector<Layer>& layers,
- std::vector<IComposerClient::Composition>& types)
+ std::vector<Layer>* outLayers,
+ std::vector<IComposerClient::Composition>* outTypes)
{
auto found = mReturnData.find(display);
if (found == mReturnData.end()) {
- layers.clear();
- types.clear();
+ outLayers->clear();
+ outTypes->clear();
return;
}
ReturnData& data = found->second;
- layers = std::move(data.changedLayers);
- types = std::move(data.compositionTypes);
+ *outLayers = std::move(data.changedLayers);
+ *outTypes = std::move(data.compositionTypes);
}
void CommandReader::takeDisplayRequests(Display display,
- uint32_t& displayRequestMask, std::vector<Layer>& layers,
- std::vector<uint32_t>& layerRequestMasks)
+ uint32_t* outDisplayRequestMask, std::vector<Layer>* outLayers,
+ std::vector<uint32_t>* outLayerRequestMasks)
{
auto found = mReturnData.find(display);
if (found == mReturnData.end()) {
- displayRequestMask = 0;
- layers.clear();
- layerRequestMasks.clear();
+ *outDisplayRequestMask = 0;
+ outLayers->clear();
+ outLayerRequestMasks->clear();
return;
}
ReturnData& data = found->second;
- displayRequestMask = data.displayRequests;
- layers = std::move(data.requestedLayers);
- layerRequestMasks = std::move(data.requestMasks);
+ *outDisplayRequestMask = data.displayRequests;
+ *outLayers = std::move(data.requestedLayers);
+ *outLayerRequestMasks = std::move(data.requestMasks);
}
void CommandReader::takeReleaseFences(Display display,
- std::vector<Layer>& layers, std::vector<int>& releaseFences)
+ std::vector<Layer>* outLayers, std::vector<int>* outReleaseFences)
{
auto found = mReturnData.find(display);
if (found == mReturnData.end()) {
- layers.clear();
- releaseFences.clear();
+ outLayers->clear();
+ outReleaseFences->clear();
return;
}
ReturnData& data = found->second;
- layers = std::move(data.releasedLayers);
- releaseFences = std::move(data.releaseFences);
+ *outLayers = std::move(data.releasedLayers);
+ *outReleaseFences = std::move(data.releaseFences);
}
-void CommandReader::takePresentFence(Display display, int& presentFence)
+void CommandReader::takePresentFence(Display display, int* outPresentFence)
{
auto found = mReturnData.find(display);
if (found == mReturnData.end()) {
- presentFence = -1;
+ *outPresentFence = -1;
return;
}
ReturnData& data = found->second;
- presentFence = data.presentFence;
+ *outPresentFence = data.presentFence;
data.presentFence = -1;
}
};
std::vector<CommandError> takeErrors();
- bool hasChanges(Display display, uint32_t& numChangedCompositionTypes,
- uint32_t& numLayerRequestMasks) const;
+ bool hasChanges(Display display, uint32_t* outNumChangedCompositionTypes,
+ uint32_t* outNumLayerRequestMasks) const;
// Get and clear saved changed composition types.
void takeChangedCompositionTypes(Display display,
- std::vector<Layer>& layers,
- std::vector<IComposerClient::Composition>& types);
+ std::vector<Layer>* outLayers,
+ std::vector<IComposerClient::Composition>* outTypes);
// Get and clear saved display requests.
void takeDisplayRequests(Display display,
- uint32_t& displayRequestMask, std::vector<Layer>& layers,
- std::vector<uint32_t>& layerRequestMasks);
+ uint32_t* outDisplayRequestMask, std::vector<Layer>* outLayers,
+ std::vector<uint32_t>* outLayerRequestMasks);
// Get and clear saved release fences.
- void takeReleaseFences(Display display, std::vector<Layer>& layers,
- std::vector<int>& releaseFences);
+ void takeReleaseFences(Display display, std::vector<Layer>* outLayers,
+ std::vector<int>* outReleaseFences);
// Get and clear saved present fence.
- void takePresentFence(Display display, int& presentFence);
+ void takePresentFence(Display display, int* outPresentFence);
private:
void resetData();
uint32_t getMaxVirtualDisplayCount();
Error createVirtualDisplay(uint32_t width, uint32_t height,
- PixelFormat& format, Display& display);
+ PixelFormat* format, Display* outDisplay);
Error destroyVirtualDisplay(Display display);
Error acceptDisplayChanges(Display display);
- Error createLayer(Display display, Layer& layer);
+ Error createLayer(Display display, Layer* outLayer);
Error destroyLayer(Display display, Layer layer);
- Error getActiveConfig(Display display, Config& config);
+ Error getActiveConfig(Display display, Config* outConfig);
Error getChangedCompositionTypes(Display display,
- std::vector<Layer>& layers,
- std::vector<IComposerClient::Composition>& types);
- Error getColorModes(Display display, std::vector<ColorMode>& modes);
+ std::vector<Layer>* outLayers,
+ std::vector<IComposerClient::Composition>* outTypes);
+ Error getColorModes(Display display, std::vector<ColorMode>* outModes);
Error getDisplayAttribute(Display display, Config config,
- IComposerClient::Attribute attribute, int32_t& value);
- Error getDisplayConfigs(Display display,
- std::vector<Config>& configs);
- Error getDisplayName(Display display, std::string& name);
+ IComposerClient::Attribute attribute, int32_t* outValue);
+ Error getDisplayConfigs(Display display, std::vector<Config>* outConfigs);
+ Error getDisplayName(Display display, std::string* outName);
- Error getDisplayRequests(Display display, uint32_t& displayRequestMask,
- std::vector<Layer>& layers,
- std::vector<uint32_t>& layerRequestMasks);
+ Error getDisplayRequests(Display display, uint32_t* outDisplayRequestMask,
+ std::vector<Layer>* outLayers,
+ std::vector<uint32_t>* outLayerRequestMasks);
- Error getDisplayType(Display display, IComposerClient::DisplayType& type);
- Error getDozeSupport(Display display, bool& support);
- Error getHdrCapabilities(Display display, std::vector<Hdr>& types,
- float& maxLuminance, float& maxAverageLuminance,
- float& minLuminance);
+ Error getDisplayType(Display display,
+ IComposerClient::DisplayType* outType);
+ Error getDozeSupport(Display display, bool* outSupport);
+ Error getHdrCapabilities(Display display, std::vector<Hdr>* outTypes,
+ float* outMaxLuminance, float* outMaxAverageLuminance,
+ float* outMinLuminance);
- Error getReleaseFences(Display display, std::vector<Layer>& layers,
- std::vector<int>& releaseFences);
+ Error getReleaseFences(Display display, std::vector<Layer>* outLayers,
+ std::vector<int>* outReleaseFences);
- Error presentDisplay(Display display, int& presentFence);
+ Error presentDisplay(Display display, int* outPresentFence);
Error setActiveConfig(Display display, Config config);
Error setClientTarget(Display display, const native_handle_t* target,
Error setClientTargetSlotCount(Display display);
- Error validateDisplay(Display display, uint32_t& numTypes,
- uint32_t& numRequests);
+ Error validateDisplay(Display display, uint32_t* outNumTypes,
+ uint32_t* outNumRequests);
Error setCursorPosition(Display display, Layer layer,
int32_t x, int32_t y);
#else
auto intFormat = static_cast<Hwc2::PixelFormat>(*format);
auto intError = mComposer->createVirtualDisplay(width, height,
- intFormat, displayId);
+ &intFormat, &displayId);
#endif
auto error = static_cast<Error>(intError);
if (error != Error::None) {
#ifdef BYPASS_IHWC
int32_t intError = mDevice.mCreateLayer(mDevice.mHwcDevice, mId, &layerId);
#else
- auto intError = mDevice.mComposer->createLayer(mId, layerId);
+ auto intError = mDevice.mComposer->createLayer(mId, &layerId);
#endif
auto error = static_cast<Error>(intError);
if (error != Error::None) {
int32_t intError = mDevice.mGetActiveConfig(mDevice.mHwcDevice, mId,
&configId);
#else
- auto intError = mDevice.mComposer->getActiveConfig(mId, configId);
+ auto intError = mDevice.mComposer->getActiveConfig(mId, &configId);
#endif
auto error = static_cast<Error>(intError);
std::vector<Hwc2::Layer> layerIds;
std::vector<Hwc2::IComposerClient::Composition> types;
auto intError = mDevice.mComposer->getChangedCompositionTypes(mId,
- layerIds, types);
+ &layerIds, &types);
uint32_t numElements = layerIds.size();
auto error = static_cast<Error>(intError);
#endif
error = static_cast<Error>(intError);
#else
std::vector<Hwc2::ColorMode> modes;
- auto intError = mDevice.mComposer->getColorModes(mId, modes);
+ auto intError = mDevice.mComposer->getColorModes(mId, &modes);
uint32_t numModes = modes.size();
auto error = static_cast<Error>(intError);
#endif
*outName = std::string(rawName.cbegin(), rawName.cend());
return Error::None;
#else
- auto intError = mDevice.mComposer->getDisplayName(mId, *outName);
+ auto intError = mDevice.mComposer->getDisplayName(mId, outName);
return static_cast<Error>(intError);
#endif
}
std::vector<Hwc2::Layer> layerIds;
std::vector<uint32_t> layerRequests;
auto intError = mDevice.mComposer->getDisplayRequests(mId,
- intDisplayRequests, layerIds, layerRequests);
+ &intDisplayRequests, &layerIds, &layerRequests);
uint32_t numElements = layerIds.size();
auto error = static_cast<Error>(intError);
#endif
#else
Hwc2::IComposerClient::DisplayType intType =
Hwc2::IComposerClient::DisplayType::INVALID;
- auto intError = mDevice.mComposer->getDisplayType(mId, intType);
+ auto intError = mDevice.mComposer->getDisplayType(mId, &intType);
#endif
auto error = static_cast<Error>(intError);
if (error != Error::None) {
&intSupport);
#else
bool intSupport = false;
- auto intError = mDevice.mComposer->getDozeSupport(mId, intSupport);
+ auto intError = mDevice.mComposer->getDozeSupport(mId, &intSupport);
#endif
auto error = static_cast<Error>(intError);
if (error != Error::None) {
error = static_cast<HWC2::Error>(intError);
#else
std::vector<Hwc2::Hdr> intTypes;
- auto intError = mDevice.mComposer->getHdrCapabilities(mId, intTypes,
- maxLuminance, maxAverageLuminance, minLuminance);
+ auto intError = mDevice.mComposer->getHdrCapabilities(mId, &intTypes,
+ &maxLuminance, &maxAverageLuminance, &minLuminance);
auto error = static_cast<HWC2::Error>(intError);
std::vector<int32_t> types;
std::vector<Hwc2::Layer> layerIds;
std::vector<int> fenceFds;
auto intError = mDevice.mComposer->getReleaseFences(mId,
- layerIds, fenceFds);
+ &layerIds, &fenceFds);
auto error = static_cast<Error>(intError);
uint32_t numElements = layerIds.size();
#endif
int32_t intError = mDevice.mPresentDisplay(mDevice.mHwcDevice, mId,
&presentFenceFd);
#else
- auto intError = mDevice.mComposer->presentDisplay(mId, presentFenceFd);
+ auto intError = mDevice.mComposer->presentDisplay(mId, &presentFenceFd);
#endif
auto error = static_cast<Error>(intError);
if (error != Error::None) {
&numTypes, &numRequests);
#else
auto intError = mDevice.mComposer->validateDisplay(mId,
- numTypes, numRequests);
+ &numTypes, &numRequests);
#endif
auto error = static_cast<Error>(intError);
if (error != Error::None && error != Error::HasChanges) {
int32_t intError = mDevice.mGetDisplayAttribute(mDevice.mHwcDevice, mId,
configId, static_cast<int32_t>(attribute), &value);
#else
- auto intError = mDevice.mComposer->getDisplayAttribute(mId,
- configId, static_cast<Hwc2::IComposerClient::Attribute>(attribute),
- value);
+ auto intError = mDevice.mComposer->getDisplayAttribute(mId, configId,
+ static_cast<Hwc2::IComposerClient::Attribute>(attribute),
+ &value);
#endif
auto error = static_cast<Error>(intError);
if (error != Error::None) {
error = static_cast<Error>(intError);
#else
std::vector<Hwc2::Config> configIds;
- auto intError = mDevice.mComposer->getDisplayConfigs(mId, configIds);
+ auto intError = mDevice.mComposer->getDisplayConfigs(mId, &configIds);
auto error = static_cast<Error>(intError);
#endif
if (error != Error::None) {