!17344 删除冗余代码

Merge pull request !17344 from 刘瓒/delete
This commit is contained in:
openharmony_ci 2024-11-22 08:06:27 +00:00 committed by Gitee
commit 7a2d7ff0ca
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 5 additions and 16 deletions

View File

@ -21,7 +21,6 @@
#include <surface.h>
#include <sync_fence.h>
#include "graphic_error.h"
#include "hdi_log.h"
#include "hdi_display_type.h"
namespace OHOS {
@ -565,7 +564,6 @@ public:
case LayerMask::LAYER_MASK_HBM_SYNC:
break;
default:
HLOGE("Invalid argument [mask:%{public}d]", static_cast<int32_t>(mask));
return ROSEN_ERROR_INVALID_ARGUMENTS;
}

View File

@ -17,6 +17,7 @@
#include <scoped_bytrace.h>
#include <unordered_set>
#include "rs_trace.h"
#include "hdi_log.h"
#include "hdi_output.h"
#include "string_utils.h"
#include "metadata_helper.h"

View File

@ -758,8 +758,7 @@ void RSComposerAdapter::LayerScaleDown(const LayerInfoPtr& layer)
{
ScalingMode scalingMode = ScalingMode::SCALING_MODE_SCALE_TO_WINDOW;
const auto& buffer = layer->GetBuffer();
const auto& surface = layer->GetSurface();
if (buffer == nullptr || surface == nullptr) {
if (buffer == nullptr) {
return;
}

View File

@ -1126,13 +1126,6 @@ void RSUniRenderComposerAdapter::LayerScaleDown(
// private func, guarantee the layer is valid
void RSUniRenderComposerAdapter::LayerScaleFit(const LayerInfoPtr& layer) const
{
const auto& buffer = layer->GetBuffer();
const auto& surface = layer->GetSurface();
if (buffer == nullptr || surface == nullptr) {
RS_LOGE("buffer or surface is nullptr");
return;
}
GraphicIRect srcRect = layer->GetCropRect();
GraphicIRect dstRect = layer->GetLayerSize();
@ -1242,9 +1235,8 @@ LayerInfoPtr RSUniRenderComposerAdapter::CreateBufferLayer(
LayerRotate(layer, surfaceDrawable);
LayerCrop(layer);
const auto& buffer = layer->GetBuffer();
const auto& surface = layer->GetSurface();
if (buffer == nullptr || surface == nullptr) {
RS_LOGE("buffer or surface is nullptr");
if (buffer == nullptr) {
RS_LOGE("buffer is nullptr");
return layer;
}
@ -1296,8 +1288,7 @@ LayerInfoPtr RSUniRenderComposerAdapter::CreateBufferLayer(RSSurfaceRenderNode&
LayerCrop(layer);
layer->SetNodeId(node.GetId());
const auto& buffer = layer->GetBuffer();
const auto& surface = layer->GetSurface();
if (buffer == nullptr || surface == nullptr) {
if (buffer == nullptr) {
RS_LOGE("buffer or surface is nullptr");
return layer;
}