Closed Bug 1178965 Opened 5 years ago Closed 5 years ago

SourceSurfaceD2D1.cpp and Factory::GetD2D1Device...

Categories

(Core :: Graphics, defect, critical)

x86
Windows 8
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: milan, Assigned: milan)

References

Details

(Keywords: crash, Whiteboard: [gfx-noted])

Crash Data

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #1155626 +++

Bug 1155626 fixed our assumption that Factory::GetD2D1Device always succeeds inside of DrawTargetD2D1.cpp, but not inside of SourceSurfaceD2D1.cpp.  Should we?
Comment on attachment 8627877 [details] [diff] [review]
Check for the failing GetD2D1Device.

Also, is mDevice used for anything?  Can we just get rid of it?
Attachment #8627877 - Attachment is patch: true
Attachment #8627877 - Flags: review?(nical.bugzilla)
Assignee: nobody → milan
Comment on attachment 8627877 [details] [diff] [review]
Check for the failing GetD2D1Device.

Review of attachment 8627877 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/2d/SourceSurfaceD2D1.cpp
@@ +78,5 @@
>    if (mRealizedBitmap) {
> +    return true;
> +  }
> +
> +  // Why aren't we using mDevice here or anywhere else?

Looking at the hg history, it looks like SourceSurfaceD2D1 used to always query the device from the factory until Bug 1078693, in which Bas added a mDevice member to check whether the device has changed since the creation of the surface (in which case the surface becomes invalid).

We could use mDevice in most places in this file.
Attachment #8627877 - Flags: review?(nical.bugzilla) → review+
Same code, just updated the comment in the patch with the bug number, etc.
Attachment #8641085 - Flags: review+
Attachment #8627877 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/de77ffb0f768
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.