mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 15:11:51 +00:00
commit
c39d60371c
@ -17,7 +17,6 @@
|
||||
#include <parameters.h>
|
||||
|
||||
#include "common/rs_obj_abs_geometry.h"
|
||||
#include "parameters.h"
|
||||
#include "platform/common/rs_log.h"
|
||||
#include "property/rs_properties_painter.h"
|
||||
#include "render/rs_drawing_filter.h"
|
||||
|
@ -3739,10 +3739,10 @@ void RSMainThread::ShowWatermark(const std::shared_ptr<Media::PixelMap> &waterma
|
||||
auto screenManager_ = CreateOrGetScreenManager();
|
||||
if (flag && screenManager_) {
|
||||
auto screenInfo = screenManager_->QueryDefaultScreenInfo();
|
||||
constexpr int maxScale = 2;
|
||||
constexpr int32_t maxScale = 2;
|
||||
if (screenInfo.id != INVALID_SCREEN_ID && watermarkImg &&
|
||||
(watermarkImg->GetWidth() > maxScale * screenInfo.width ||
|
||||
watermarkImg->GetHeight() > maxScale * screenInfo.height)) {
|
||||
(watermarkImg->GetWidth() > maxScale * static_cast<int32_t>(screenInfo.width) ||
|
||||
watermarkImg->GetHeight() > maxScale * static_cast<int32_t>(screenInfo.height))) {
|
||||
RS_LOGE("RSMainThread::ShowWatermark width %{public}" PRId32" or height %{public}" PRId32" has reached"
|
||||
" the maximum limit!", watermarkImg->GetWidth(), watermarkImg->GetHeight());
|
||||
return;
|
||||
|
@ -559,6 +559,11 @@ std::shared_ptr<Drawing::Surface> DmaMem::GetSurfaceFromSurfaceBuffer(
|
||||
Drawing::TextureOrigin::TOP_LEFT,
|
||||
1, Drawing::ColorType::COLORTYPE_RGBA_8888, nullptr,
|
||||
NativeBufferUtils::DeleteVkImage, cleanUpHelper);
|
||||
if (!drawingSurface) {
|
||||
delete cleanUpHelper;
|
||||
cleanUpHelper = nullptr;
|
||||
RS_LOGE("DmaMem::GetSurfaceFromSurfaceBuffer: MakeFromBackendTexture fail.");
|
||||
}
|
||||
return drawingSurface;
|
||||
}
|
||||
#endif
|
||||
|
@ -1279,7 +1279,7 @@ LayerInfoPtr RSUniRenderComposerAdapter::CreateBufferLayer(RSSurfaceRenderNode&
|
||||
LayerCrop(layer);
|
||||
layer->SetNodeId(node.GetId());
|
||||
const auto nodeParams = static_cast<RSSurfaceRenderParams*>(node.GetRenderParams().get());
|
||||
if (nodeParams) {
|
||||
if (!nodeParams) {
|
||||
RS_LOGE("node params is nullptr");
|
||||
return layer;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ public:
|
||||
static void TraverseAndCollectUIExtensionInfo(std::shared_ptr<RSRenderNode> node,
|
||||
Drawing::Matrix parentMatrix, NodeId hostId, UIExtensionCallbackData& callbackData);
|
||||
static void ProcessCacheImage(RSPaintFilterCanvas& canvas, Drawing::Image& cacheImageProcessed);
|
||||
static void FlushDmaSurfaceBuffer(Media::PixelMap* pixelmap);
|
||||
static void FlushDmaSurfaceBuffer(Media::PixelMap* pixelMap);
|
||||
template<typename... Callbacks>
|
||||
static void TraverseParentNodeAndReduce(std::shared_ptr<RSSurfaceRenderNode> hwcNode, Callbacks&&... callbacks)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user