Closed Bug 933584 Opened 8 years ago Closed 8 years ago

Implement DrawTargetSkia::OptimizeSourceSurface

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: gal, Assigned: gal)

References

(Blocks 1 open bug)

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

No description provided.
Assignee: nobody → gal
Attachment #825703 - Flags: review?(matt.woodrow)
Blocks: 933577
Comment on attachment 825703 [details] [diff] [review]
Turn any source surface into a skia source surface by re-creating it via GetDataSurface().

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

Looks good for the most part, r=me with my comment fixed.

::: gfx/2d/DrawTargetSkia.cpp
@@ +641,5 @@
>  {
> +  if (aSurface->GetType() == SURFACE_SKIA) {
> +    return aSurface;
> +  }
> +

We should only do this if GetType() == SURFACE_DATA. Otherwise we're supporting interop between DT types, which is an explicit non-goal for moz2d.

The 2D.h comment for this could probably be better here. My understanding is that it optimizes a surface for this instance of a DT, not converts between backend types.
Attachment #825703 - Flags: review?(matt.woodrow) → review+
It feels wrong to break this if it just works, but anything that gets me an r+.
The comment in 2D.h really, really disagrees with you. "arbitrary"

   * Create a SourceSurface optimized for use with this DrawTarget from                                                                                                         
   * an arbitrary other SourceSurface. This may return aSourceSurface or some                                                                                                   
   * other existing surface.
Attachment #825703 - Attachment is obsolete: true
Attachment #825736 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/3f086c46a2f5
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.