BasicCompositor does not render to cairo win32 dibsection surface on Windows

RESOLVED FIXED in Firefox 48

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: sotaro, Assigned: sotaro)

Tracking

(Blocks 1 bug)

unspecified
mozilla48
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox48 fixed)

Details

Attachments

(1 attachment, 5 obsolete attachments)

BasicCompositor::CreateRenderTarget() create a similar DrawTarget that has DDB. It is not good for read back.
Assignee: nobody → sotaro.ikeda.g
Update error handling consistent to DrawTargetCairo.
Attachment #8728842 - Attachment is obsolete: true
correct patch.
Attachment #8728883 - Attachment is obsolete: true
Attachment #8728894 - Flags: review?(jmuizelaar)
Attachment #8728894 - Flags: review?(jmuizelaar)
Attachment #8728894 - Flags: review?(jmuizelaar)
Comment on attachment 8728894 [details] [diff] [review]
patch - Create DrawTarget with DIB as similar DrawTarget

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

::: gfx/2d/DrawTargetCairo.cpp
@@ +1755,5 @@
> +    similar = cairo_win32_surface_create_with_dib(GfxFormatToCairoFormat(aFormat),
> +                                                  aSize.width, aSize.height);
> +    if (cairo_surface_status(similar)) {
> +        similar = nullptr;
> +        gfxCriticalError(CriticalLog::DefaultOptions(Factory::ReasonableSurfaceSize(aSize))) << "Failed to create similar cairo_win32_surface! Size: " << aSize << " Status: " << cairo_surface_status(similar) << cairo_surface_status(cairo_get_group_target(mContext)) << " format " << (int)aFormat;

As discussed let's make this code common.

@@ +1759,5 @@
> +        gfxCriticalError(CriticalLog::DefaultOptions(Factory::ReasonableSurfaceSize(aSize))) << "Failed to create similar cairo_win32_surface! Size: " << aSize << " Status: " << cairo_surface_status(similar) << cairo_surface_status(cairo_get_group_target(mContext)) << " format " << (int)aFormat;
> +    }
> +  }
> +#endif
> +  if (!similar) {

else
#endif
Attachment #8728894 - Flags: review?(jmuizelaar) → review-
Attachment #8728894 - Attachment is obsolete: true
Attachment #8729357 - Flags: review?(jmuizelaar)
Comment on attachment 8729357 [details] [diff] [review]
patch - Create DrawTarget with DIB as similar DrawTarget

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

::: gfx/2d/DrawTargetCairo.cpp
@@ +1748,5 @@
>        return target.forget();
>      }
>    }
>  
> +  cairo_surface_t* similar = nullptr;

similar doesn't need to be initialized to null

@@ +1755,5 @@
> +    similar = cairo_win32_surface_create_with_dib(GfxFormatToCairoFormat(aFormat),
> +                                                  aSize.width, aSize.height);
> +  } else
> +#endif
> +  if (!similar) {

The if condition can be dropped.
Attachment #8729357 - Flags: review?(jmuizelaar) → review+
Attachment #8729357 - Attachment is obsolete: true
Attachment #8729360 - Flags: review?(jmuizelaar)
Comment on attachment 8729360 [details] [diff] [review]
patch - Create DrawTarget with DIB as similar DrawTarget

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

::: gfx/2d/DrawTargetCairo.cpp
@@ +1748,5 @@
>        return target.forget();
>      }
>    }
>  
> +  cairo_surface_t* similar = nullptr;

Drop the '= nullptr;'
Attachment #8729360 - Flags: review?(jmuizelaar) → review+
Summary: BasicCompositor does not rendered to cairo win32 surface with dib on Windows → BasicCompositor does not render to cairo win32 dibsection surface on Windows
Apply the comment. Carry "r=jrmuizel".
Attachment #8729360 - Attachment is obsolete: true
Attachment #8730060 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/0ce677405454
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.