Commit Graph
12 Commits
Author SHA1 Message Date
Nicholas Nethercote 3f2b2ab546 Bug 1223690 - Remove implicit Rect conversions. r=jrmuizel.
gfxRect can be implicitly constructed from IntRect, which hides a number of
implicit conversion points, makes Moz2Dification harder, and has some
surprising effects.

This patch removes the implicit constructor and replaces it with an explicit
conversion function:

  gfxRect ThebesRect(const IntRect&)

This is the obvious outcome of removing the constructor.

But there is also a second, less obvious outcome: currently we do a number of
IntRect-to-Rect conversions using ToRect(), which (surprisingly) works because
it turns into an implicit IntRect-to-gfxRect conversion (via the implicit
constructor) combined with an explicit gfxRect-to-Rect conversion (via
ToRect()). I.e. we do two conversions, going from a Moz2D type to a Thebes
type and back to a Moz2D type!

So this patch also changes these conversion. It moves this existing function:

  Rect ToRect(const IntRect&)

from gfx2DGlue.h -- where it doesn't really belong because it doesn't involve
any Thebes types -- to gfx/2d/Rect.h, templatifying and renaming it as
IntRectToRect() in the process.

The rest of the patch deals with fall-out from these changes. The call sites
change as follows:

- IntRect-to-gfxRect conversions:
  - old: implicit
  - new: ThebesRect()

- IntRect-to-Rect conversions:
  - old: ToRect()
  - new: IntRectToRect()
2015-11-11 14:23:14 -08:00
Sotaro Ikeda 4d1ad622d9 Bug 1169093 - Do not use HWC when a region of layer is too small r=mattwoodrow 2015-06-04 07:07:36 -07:00
Sotaro Ikeda 68bb70fada Bug 1100110 - Fix ScaleMode handling of ImageLayer and HwcComposer2D r=mattwoodrow 2014-12-06 17:12:50 -08:00
Sushil Chauhan aaa348a3eb Bug 1078189 - Back out bug 1059023 for causing regression. r=dwilson 2014-10-06 16:28:46 -07:00
Sushil Chauhan 403d9d7023 Bug 1059023 - Do not compose layer hidden under the opaque layer. r=mattwoodrow 2014-08-28 10:44:03 -07:00
David Zbarsky 2dbff47ace Bug 952977: Various other changes of gfx3DMatrix -> Matrix4x4 r=nical 2014-08-22 09:40:02 -04:00
Ed Morley 380445ca3c Backed out changeset 3325dc888b50 (bug 952977) for build failures 2014-08-21 16:57:44 +01:00
David Zbarsky cbb4771267 Bug 952977: Various other changes of gfx3DMatrix -> Matrix4x4 r=nical 2014-08-21 11:35:28 -04:00
Benoit Girard a13c11c5e4 Bug 1014741 - Don't spam skip layer. r=sotaro 2014-05-22 16:07:48 -04:00
Sotaro Ikeda d7955b6090 Bug 957276 - Fix YFlipped buffer's source crop r=sushil 2014-02-22 04:56:02 -08:00
Diego Wilson 008d3f3a7c Bug 896765 - Move the common utilities from HwcComposer2D to HwcUtils. r=ncameron 2013-08-29 08:17:59 -07:00
Diego Wilson 8debb4b2ac Bug 896765 - Add new file for the common utility functions for HwcComposer2D. r=nrc 2013-08-26 10:11:24 -07:00