本文整理汇总了C++中hwcomposer::HWCLayerInterface::setFillColor方法的典型用法代码示例。如果您正苦于以下问题:C++ HWCLayerInterface::setFillColor方法的具体用法?C++ HWCLayerInterface::setFillColor怎么用?C++ HWCLayerInterface::setFillColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hwcomposer::HWCLayerInterface
的用法示例。
在下文中一共展示了HWCLayerInterface::setFillColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setGeometry
void Layer::setGeometry(
const sp<const DisplayDevice>& hw,
HWComposer::HWCLayerInterface& layer)
{
LayerBaseClient::setGeometry(hw, layer);
// enable this layer
layer.setSkip(false);
// we can't do alpha-fade with the hwc HAL
const State& s(drawingState());
if (s.alpha < 0xFF) {
layer.setSkip(true);
}
if (isSecure() && !hw->isSecure()) {
layer.setSkip(true);
}
/*
* Transformations are applied in this order:
* 1) buffer orientation/flip/mirror
* 2) state transformation (window manager)
* 3) layer orientation (screen orientation)
* (NOTE: the matrices are multiplied in reverse order)
*/
const Transform bufferOrientation(mCurrentTransform);
const Transform tr(hw->getTransform() * s.transform * bufferOrientation);
// this gives us only the "orientation" component of the transform
const uint32_t finalTransform = tr.getOrientation();
// we can only handle simple transformation
if (finalTransform & Transform::ROT_INVALID) {
layer.setSkip(true);
} else {
layer.setTransform(finalTransform);
}
layer.setCrop(computeBufferCrop());
// [MTK] {{{
hwc_color_t color;
color.a = s.alpha;
layer.setFillColor(color);
layer.setTransform(finalTransform);
layer.setIdentity(getIdentity());
layer.setMatrix(tr);
layer.setSecure((isSecure() || isProtected()));
// [MTK] }}}
}