Skip to content
Snippets Groups Projects
user avatar
Tyler Freeman authored
fix(force invert): fix white-on-white text when text is drawn against a fill rect in the same RenderNode

This fixes issues with custom Views that draw background and text in the
same View/RenderNode. Instead of trying to force the individual paints
to be dark, we simply invert the whole view.

Adds a new hasFill() member to DisplayList and Canvas so that we record
when the RenderNode has a call that fills the background.

Also adds a new Container usage hint type, for this exact situation.

Bug: 282821643
Bug: 293883260
Test: RenderNodeTests.cpp:
  mmm -j8 frameworks/base/libs/hwui && adb push $ANDROID_PRODUCT_OUT/data/nativetest/hwui_unit_tests/hwui_unit_tests     /data/nativetest/hwui_unit_tests/hwui_unit_tests && adb shell /data/nativetest/hwui_unit_tests/hwui_unit_tests

Change-Id: Ia0fe9c739bf07c1f3a8508d3f295a1dc54ee48f9
e0faa69a
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..
aconfig
apex
api
canvas
effects
hwui
jni
pipeline/skia
private
protos
renderstate
renderthread
service
shader
tests
thread
utils
.clang-format
Android.bp
AndroidTest.xml
AnimationContext.cpp
AnimationContext.h
Animator.cpp
Animator.h
AnimatorManager.cpp
AnimatorManager.h
AutoBackendTextureRelease.cpp
AutoBackendTextureRelease.h
CanvasProperty.h
CanvasTransform.cpp
CanvasTransform.h
ColorFilter.h
ColorMode.h
CopyRequest.h
DamageAccumulator.cpp
DamageAccumulator.h
Debug.h
DeferredLayerUpdater.cpp
DeferredLayerUpdater.h
DeviceInfo.cpp
DeviceInfo.h
DisplayList.h
DisplayListOps.in
FeatureFlags.h
FrameInfo.cpp
FrameInfo.h
FrameInfoVisualizer.cpp
FrameInfoVisualizer.h
FrameMetricsObserver.h
FrameMetricsReporter.cpp
FrameMetricsReporter.h
Gainmap.cpp
Gainmap.h
HWUIProperties.sysprop
HardwareBitmapUploader.cpp
HardwareBitmapUploader.h
IContextFactory.h
IProfileRenderer.h
Interpolator.cpp
Interpolator.h
JankTracker.cpp
JankTracker.h
Layer.cpp
Layer.h
LayerUpdateQueue.cpp
LayerUpdateQueue.h
Lighting.h
LightingInfo.cpp
LightingInfo.h
MODULE_LICENSE_APACHE2
Matrix.cpp
Matrix.h
MemoryPolicy.cpp
MemoryPolicy.h
Mesh.cpp
Mesh.h
NOTICE
NinePatchUtils.h
OWNERS
Outline.h
PathParser.cpp
PathParser.h
ProfileData.cpp
ProfileData.h
ProfileDataContainer.cpp
ProfileDataContainer.h
Properties.cpp
Properties.h
PropertyValuesAnimatorSet.cpp
PropertyValuesAnimatorSet.h
PropertyValuesHolder.cpp
PropertyValuesHolder.h
Readback.cpp
Readback.h
RecordingCanvas.cpp
RecordingCanvas.h
Rect.h
RenderNode.cpp
RenderNode.h
RenderProperties.cpp