Merge "resolve merge conflicts of 802cc7defb to sc-v2-dev-plus-aosp" into sc-v2-dev-plus-aosp
This commit is contained in:
@@ -90,6 +90,8 @@ bool Properties::enableWebViewOverlays = true;
|
|||||||
|
|
||||||
StretchEffectBehavior Properties::stretchEffectBehavior = StretchEffectBehavior::ShaderHWUI;
|
StretchEffectBehavior Properties::stretchEffectBehavior = StretchEffectBehavior::ShaderHWUI;
|
||||||
|
|
||||||
|
DrawingEnabled Properties::drawingEnabled = DrawingEnabled::NotInitialized;
|
||||||
|
|
||||||
bool Properties::load() {
|
bool Properties::load() {
|
||||||
bool prevDebugLayersUpdates = debugLayersUpdates;
|
bool prevDebugLayersUpdates = debugLayersUpdates;
|
||||||
bool prevDebugOverdraw = debugOverdraw;
|
bool prevDebugOverdraw = debugOverdraw;
|
||||||
@@ -143,6 +145,9 @@ bool Properties::load() {
|
|||||||
|
|
||||||
enableWebViewOverlays = base::GetBoolProperty(PROPERTY_WEBVIEW_OVERLAYS_ENABLED, true);
|
enableWebViewOverlays = base::GetBoolProperty(PROPERTY_WEBVIEW_OVERLAYS_ENABLED, true);
|
||||||
|
|
||||||
|
// call isDrawingEnabled to force loading of the property
|
||||||
|
isDrawingEnabled();
|
||||||
|
|
||||||
return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw);
|
return (prevDebugLayersUpdates != debugLayersUpdates) || (prevDebugOverdraw != debugOverdraw);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,5 +217,19 @@ void Properties::overrideRenderPipelineType(RenderPipelineType type, bool inUnit
|
|||||||
sRenderPipelineType = type;
|
sRenderPipelineType = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Properties::setDrawingEnabled(bool newDrawingEnabled) {
|
||||||
|
drawingEnabled = newDrawingEnabled ? DrawingEnabled::On : DrawingEnabled::Off;
|
||||||
|
enableRTAnimations = newDrawingEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Properties::isDrawingEnabled() {
|
||||||
|
if (drawingEnabled == DrawingEnabled::NotInitialized) {
|
||||||
|
bool drawingEnabledProp = base::GetBoolProperty(PROPERTY_DRAWING_ENABLED, true);
|
||||||
|
drawingEnabled = drawingEnabledProp ? DrawingEnabled::On : DrawingEnabled::Off;
|
||||||
|
enableRTAnimations = drawingEnabledProp;
|
||||||
|
}
|
||||||
|
return drawingEnabled == DrawingEnabled::On;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace uirenderer
|
} // namespace uirenderer
|
||||||
} // namespace android
|
} // namespace android
|
||||||
|
|||||||
@@ -187,6 +187,12 @@ enum DebugLevel {
|
|||||||
*/
|
*/
|
||||||
#define PROPERTY_WEBVIEW_OVERLAYS_ENABLED "debug.hwui.webview_overlays_enabled"
|
#define PROPERTY_WEBVIEW_OVERLAYS_ENABLED "debug.hwui.webview_overlays_enabled"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Property for globally GL drawing state. Can be overridden per process with
|
||||||
|
* setDrawingEnabled.
|
||||||
|
*/
|
||||||
|
#define PROPERTY_DRAWING_ENABLED "debug.hwui.drawing_enabled"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Misc
|
// Misc
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -208,6 +214,8 @@ enum class StretchEffectBehavior {
|
|||||||
UniformScale // Uniform scale stretch everywhere
|
UniformScale // Uniform scale stretch everywhere
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class DrawingEnabled { NotInitialized, On, Off };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renderthread-only singleton which manages several static rendering properties. Most of these
|
* Renderthread-only singleton which manages several static rendering properties. Most of these
|
||||||
* are driven by system properties which are queried once at initialization, and again if init()
|
* are driven by system properties which are queried once at initialization, and again if init()
|
||||||
@@ -302,6 +310,11 @@ public:
|
|||||||
stretchEffectBehavior = behavior;
|
stretchEffectBehavior = behavior;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Represents if drawing is enabled. Should only be Off in headless testing environments
|
||||||
|
static DrawingEnabled drawingEnabled;
|
||||||
|
static bool isDrawingEnabled();
|
||||||
|
static void setDrawingEnabled(bool enable);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static StretchEffectBehavior stretchEffectBehavior;
|
static StretchEffectBehavior stretchEffectBehavior;
|
||||||
static ProfileType sProfileType;
|
static ProfileType sProfileType;
|
||||||
|
|||||||
Reference in New Issue
Block a user