Move functions from APZC to FrameMetrics

RESOLVED FIXED in mozilla25

Status

()

Core
Graphics: Layers
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: kats, Assigned: kats)

Tracking

23 Branch
mozilla25
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

There are some static functions in APZC that operate only on a FrameMetrics:
- CalculateIntrinsicScale
- CalculateResolution
- CalculateCompositedRectInCssPixels

These should be moved into FrameMetrics.h or inlined directly since they have been greatly simplified since their original incarnations.
Another useful function to throw on FrameMetrics would be one that takes a gfxTransform and returns a CSSToLayerScale based on the transform and the mDevPixelsPerCSSPixel value. See https://bugzilla.mozilla.org/show_bug.cgi?id=883646#c13
Created attachment 767367 [details] [diff] [review]
Part 1 - Move CalculateIntrinsicScale to FrameMetrics
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #1)
> Another useful function to throw on FrameMetrics would be one that takes a
> gfxTransform and returns a CSSToLayerScale based on the transform and the
> mDevPixelsPerCSSPixel value. See
> https://bugzilla.mozilla.org/show_bug.cgi?id=883646#c13

Upon further hacking I don't think this is a good idea, because pulling a CSSToLayerScale out of the gfxTransform is inherently wrong. See the patch at https://bugzilla.mozilla.org/show_bug.cgi?id=866265#c3 and the comments therein.
Attachment #767367 - Flags: review?(ajones)
Created attachment 767461 [details] [diff] [review]
Part 2 - Move CalculateResolution
Assignee: nobody → bugmail.mozilla
Attachment #767461 - Flags: review?(ajones)
Created attachment 767462 [details] [diff] [review]
Part 3 - Move CalculateCompositedRectInCssPixels

These all build for me locally, pushed to try at https://tbpl.mozilla.org/?tree=Try&rev=27d8ccbc68ce
Attachment #767462 - Flags: review?(ajones)
Attachment #767367 - Flags: review?(ajones) → review+
Attachment #767461 - Flags: review?(ajones) → review+
Attachment #767462 - Flags: review?(ajones) → review+
You need to log in before you can comment on or make changes to this bug.