mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1628692 - Fix FallibleTArray handling in gfxContext::CurrentDash. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D71576
This commit is contained in:
parent
3d350bb101
commit
d62827d0da
@ -41,7 +41,7 @@ UserDataKey gfxContext::sDontUseAsSourceKey;
|
||||
# define CURRENTSTATE_CHANGED()
|
||||
#endif
|
||||
|
||||
PatternFromState::operator mozilla::gfx::Pattern&() {
|
||||
PatternFromState::operator mozilla::gfx::Pattern &() {
|
||||
gfxContext::AzureState& state = mContext->CurrentState();
|
||||
|
||||
if (state.pattern) {
|
||||
@ -432,12 +432,10 @@ bool gfxContext::CurrentDash(FallibleTArray<Float>& dashes,
|
||||
const AzureState& state = CurrentState();
|
||||
int count = state.strokeOptions.mDashLength;
|
||||
|
||||
if (count <= 0 || !dashes.SetLength(count, fallible)) {
|
||||
if (count <= 0 || !dashes.Assign(state.dashPattern, fallible)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
dashes = state.dashPattern;
|
||||
|
||||
*offset = state.strokeOptions.mDashOffset;
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user