Avoid copying all the tiles when doing PushGroupAndCopyBackground with a DrawTargetTiled

RESOLVED FIXED in mozilla35

Status

()

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

Tracking

(Blocks 1 bug)

29 Branch
mozilla35
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Currently we take a snapshot, and then when drawing this into the 'native' DT it calls GetDataSurface which makes a copy of the entire tiled surface.

If we instead expose DrawTargetTiled we can make gfxContext much smarter about this. Once we have a native PushLayer API in Moz2D this can go away again.
Attachment #8477206 - Attachment is patch: true
Attachment #8477206 - Flags: review?(bas)
Assignee: nobody → matt.woodrow
Blocks: 983035
Comment on attachment 8477206 [details] [diff] [review]
Smarter copy background

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

::: gfx/thebes/gfxContext.cpp
@@ +1123,3 @@
>  
>      mDT->SetTransform(Matrix());
> +    if (source->GetType() == SurfaceType::TILED) {

I really -really- hate this, this needs some big XXX to make it go away when we add a PushLayer API (when we have D2D 1.1), but for now it seems like the right solution. Sadly.
Attachment #8477206 - Flags: review?(bas) → review+
https://hg.mozilla.org/mozilla-central/rev/bb624833b237
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Depends on: 1251177
You need to log in before you can comment on or make changes to this bug.