зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1771349 - Add some null checks to DrawTargetRecording. r=aosmond,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D147520
This commit is contained in:
Родитель
e3d25251cc
Коммит
a7712554f4
|
@ -235,6 +235,10 @@ void DrawTargetRecording::StrokeLine(const Point& aBegin, const Point& aEnd,
|
|||
|
||||
void DrawTargetRecording::Fill(const Path* aPath, const Pattern& aPattern,
|
||||
const DrawOptions& aOptions) {
|
||||
if (!aPath) {
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<PathRecording> pathRecording = EnsurePathStored(aPath);
|
||||
EnsurePatternDependenciesStored(aPattern);
|
||||
|
||||
|
@ -262,6 +266,10 @@ void DrawTargetRecording::FillGlyphs(ScaledFont* aFont,
|
|||
const GlyphBuffer& aBuffer,
|
||||
const Pattern& aPattern,
|
||||
const DrawOptions& aOptions) {
|
||||
if (!aFont) {
|
||||
return;
|
||||
}
|
||||
|
||||
EnsurePatternDependenciesStored(aPattern);
|
||||
|
||||
UserDataKey* userDataKey = reinterpret_cast<UserDataKey*>(mRecorder.get());
|
||||
|
@ -320,6 +328,10 @@ void DrawTargetRecording::Mask(const Pattern& aSource, const Pattern& aMask,
|
|||
void DrawTargetRecording::MaskSurface(const Pattern& aSource,
|
||||
SourceSurface* aMask, Point aOffset,
|
||||
const DrawOptions& aOptions) {
|
||||
if (!aMask) {
|
||||
return;
|
||||
}
|
||||
|
||||
EnsurePatternDependenciesStored(aSource);
|
||||
EnsureSurfaceStoredRecording(mRecorder, aMask, "MaskSurface");
|
||||
|
||||
|
@ -369,6 +381,10 @@ void DrawTargetRecording::DrawSurface(SourceSurface* aSurface,
|
|||
const Rect& aDest, const Rect& aSource,
|
||||
const DrawSurfaceOptions& aSurfOptions,
|
||||
const DrawOptions& aOptions) {
|
||||
if (!aSurface) {
|
||||
return;
|
||||
}
|
||||
|
||||
EnsureSurfaceStoredRecording(mRecorder, aSurface, "DrawSurface");
|
||||
|
||||
mRecorder->RecordEvent(RecordedDrawSurface(this, aSurface, aDest, aSource,
|
||||
|
@ -385,6 +401,10 @@ void DrawTargetRecording::DrawSurfaceWithShadow(SourceSurface* aSurface,
|
|||
const Point& aDest,
|
||||
const ShadowOptions& aShadow,
|
||||
CompositionOp aOp) {
|
||||
if (!aSurface) {
|
||||
return;
|
||||
}
|
||||
|
||||
EnsureSurfaceStoredRecording(mRecorder, aSurface, "DrawSurfaceWithShadow");
|
||||
|
||||
mRecorder->RecordEvent(
|
||||
|
@ -394,6 +414,10 @@ void DrawTargetRecording::DrawSurfaceWithShadow(SourceSurface* aSurface,
|
|||
void DrawTargetRecording::DrawFilter(FilterNode* aNode, const Rect& aSourceRect,
|
||||
const Point& aDestPoint,
|
||||
const DrawOptions& aOptions) {
|
||||
if (!aNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mRecorder->HasStoredObject(aNode));
|
||||
|
||||
mRecorder->RecordEvent(
|
||||
|
@ -416,6 +440,10 @@ void DrawTargetRecording::ClearRect(const Rect& aRect) {
|
|||
void DrawTargetRecording::CopySurface(SourceSurface* aSurface,
|
||||
const IntRect& aSourceRect,
|
||||
const IntPoint& aDestination) {
|
||||
if (!aSurface) {
|
||||
return;
|
||||
}
|
||||
|
||||
EnsureSurfaceStoredRecording(mRecorder, aSurface, "CopySurface");
|
||||
|
||||
mRecorder->RecordEvent(
|
||||
|
@ -423,6 +451,10 @@ void DrawTargetRecording::CopySurface(SourceSurface* aSurface,
|
|||
}
|
||||
|
||||
void DrawTargetRecording::PushClip(const Path* aPath) {
|
||||
if (!aPath) {
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<PathRecording> pathRecording = EnsurePathStored(aPath);
|
||||
|
||||
mRecorder->RecordEvent(RecordedPushClip(this, pathRecording));
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<html>
|
||||
<head>
|
||||
<script>
|
||||
window.onload = () => {
|
||||
const label = document.createElement('label')
|
||||
document.body.appendChild(label)
|
||||
label.animate([{
|
||||
'padding': '275.54691831291296cm',
|
||||
'background': 'text fixed hsl(175.6098493451229,89%,0%) ',
|
||||
'mask': 'fill-box ,padding-box intersect center 24% fill-box linear-gradient(hsla(354.65617615270634,1%,2%,146.0764826534465),hsla(300.2690126518504,99%,48%,0.841477593386796) 26%,transparent 81%) luminance ',
|
||||
}, {}], 156.50608410692323)
|
||||
}
|
||||
</script>
|
||||
<body></body>
|
||||
</html>
|
|
@ -214,5 +214,6 @@ load 1758127-1.html
|
|||
load 1762973-1.html
|
||||
pref(layout.css.backdrop-filter.enabled,true) load 1765667.html
|
||||
load 1768096-1.html
|
||||
load 1771349-1.html
|
||||
pref(layout.css.backdrop-filter.enabled,true) load 1771294.html
|
||||
pref(layout.css.backdrop-filter.enabled,true) load 1771293.html
|
||||
|
|
Загрузка…
Ссылка в новой задаче