mirror of
https://github.com/openharmony/ace_ace_engine.git
synced 2026-07-19 22:54:50 -04:00
@@ -711,6 +711,9 @@ std::unique_ptr<PlatformWindow> FlutterAceView::GetPlatformWindow()
|
||||
|
||||
void FlutterAceView::InitIOManager(RefPtr<TaskExecutor> taskExecutor)
|
||||
{
|
||||
if (!SystemProperties::GetGpuUploadEnabled()) {
|
||||
return;
|
||||
}
|
||||
#if defined(ENABLE_ROSEN_BACKEND) and !defined(UPLOAD_GPU_DISABLED)
|
||||
ACE_SCOPED_TRACE("InitIOManager");
|
||||
EGLContext shareContext = nullptr;
|
||||
|
||||
@@ -111,6 +111,12 @@ bool IsDebugEnabled()
|
||||
{
|
||||
return (system::GetParameter("persist.ace.debug.enabled", "0") == "1");
|
||||
}
|
||||
|
||||
bool IsGpuUploadEnabled()
|
||||
{
|
||||
return (system::GetParameter("persist.ace.gpuupload.enabled", "0") == "1" ||
|
||||
system::GetParameter("debug.ace.gpuupload.enabled", "0") == "1");
|
||||
}
|
||||
} // namespace
|
||||
|
||||
bool SystemProperties::IsSyscapExist(const char* cap)
|
||||
@@ -176,6 +182,7 @@ bool SystemProperties::windowAnimationEnabled_ = IsWindowAnimationEnabled();
|
||||
bool SystemProperties::debugEnabled_ = IsDebugEnabled();
|
||||
int32_t SystemProperties::windowPosX_ = 0;
|
||||
int32_t SystemProperties::windowPosY_ = 0;
|
||||
bool SystemProperties::gpuUploadEnabled_ = IsGpuUploadEnabled();
|
||||
|
||||
DeviceType SystemProperties::GetDeviceType()
|
||||
{
|
||||
|
||||
@@ -85,6 +85,7 @@ bool SystemProperties::windowAnimationEnabled_ = false;
|
||||
int32_t SystemProperties::windowPosX_ = 0;
|
||||
int32_t SystemProperties::windowPosY_ = 0;
|
||||
bool SystemProperties::debugBoundaryEnabled_ = false;
|
||||
bool SystemProperties::gpuUploadEnabled_ = false;
|
||||
|
||||
DeviceType SystemProperties::GetDeviceType()
|
||||
{
|
||||
|
||||
@@ -197,6 +197,11 @@ public:
|
||||
}
|
||||
|
||||
static bool GetDebugEnabled();
|
||||
|
||||
static bool GetGpuUploadEnabled()
|
||||
{
|
||||
return gpuUploadEnabled_;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set device orientation.
|
||||
@@ -301,6 +306,7 @@ private:
|
||||
static int32_t windowPosX_;
|
||||
static int32_t windowPosY_;
|
||||
static bool debugBoundaryEnabled_;
|
||||
static bool gpuUploadEnabled_;
|
||||
};
|
||||
|
||||
} // namespace OHOS::Ace
|
||||
|
||||
Reference in New Issue
Block a user