gecko-dev/gfx/layers/basic
Nicholas Nethercote 489c83b1dd 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()

--HG--
extra : rebase_source : e4e4c2ad10b36ecad4d57d1630158f3374e403be
2015-11-11 14:23:14 -08:00
..
AutoMaskData.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
BasicCanvasLayer.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
BasicCanvasLayer.h Bug 1182996 - Fix and add missing namespace comments. rs=ehsan 2015-07-13 08:25:42 -07:00
BasicColorLayer.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
BasicCompositor.cpp Bug 1223690 - Remove implicit Rect conversions. r=jrmuizel. 2015-11-11 14:23:14 -08:00
BasicCompositor.h Bug 1218617 - Invalidate whole widget area after external composition r=mattwoodrow 2015-10-27 22:56:27 -07:00
BasicContainerLayer.cpp Bug 1222661 - Replace ToUntyped(obj) calls with obj.ToUnknown*(). r=nical 2015-11-06 22:13:40 -05:00
BasicContainerLayer.h Bug 1182996 - Fix and add missing namespace comments. rs=ehsan 2015-07-13 08:25:42 -07:00
BasicImageLayer.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
BasicImages.cpp Bug 1217080. Move recycling functionality into RecyclingPlanarYCbCrImage. r=nical 2015-11-06 13:55:31 -05:00
BasicImplData.h Bug 1208345 - Remove gfxContext::GraphicsOperator. r=jwatt. 2015-09-24 22:38:58 -07:00
BasicLayerManager.cpp Bug 1223690 - Remove implicit Rect conversions. r=jrmuizel. 2015-11-11 14:23:14 -08:00
BasicLayers.h Bug 1210560 - Part 5: Convert BasicLayers usecases to PushGroupForBlendBack and temporary surfaces. r=jrmuizel 2015-11-11 16:15:39 +01:00
BasicLayersImpl.cpp Bug 1210560 - Part 5: Convert BasicLayers usecases to PushGroupForBlendBack and temporary surfaces. r=jrmuizel 2015-11-11 16:15:39 +01:00
BasicLayersImpl.h Bug 1210560 - Part 5: Convert BasicLayers usecases to PushGroupForBlendBack and temporary surfaces. r=jrmuizel 2015-11-11 16:15:39 +01:00
BasicPaintedLayer.cpp Bug 1210560 - Part 5: Convert BasicLayers usecases to PushGroupForBlendBack and temporary surfaces. r=jrmuizel 2015-11-11 16:15:39 +01:00
BasicPaintedLayer.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
GrallocTextureHostBasic.cpp Bug 1209812 (follow-up) - Android bustage fix on a CLOSED TREE. r=me. 2015-10-28 19:33:16 -07:00
GrallocTextureHostBasic.h Bug 1210182 - Implement GrallocTextureHostBasic r=nical 2015-10-26 22:43:07 -07:00
MacIOSurfaceTextureHostBasic.cpp Bug 1072313 - Check for more leaks in the layers code. r=mstange 2015-07-29 11:57:03 -04:00
MacIOSurfaceTextureHostBasic.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
TextureClientX11.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
TextureClientX11.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
TextureHostBasic.cpp Bug 1210182 - Implement GrallocTextureHostBasic r=nical 2015-10-26 22:43:07 -07:00
TextureHostBasic.h
X11BasicCompositor.cpp Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
X11BasicCompositor.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00
X11TextureSourceBasic.cpp Bug 1132854 - Remove the gfx::ToIntSize conversion helper. r=Bas 2015-04-07 16:08:57 +02:00
X11TextureSourceBasic.h Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat 2015-10-18 01:24:48 -04:00