Bug 1222661 - Replace ToUnknown(obj) and FromUnknown(obj) with obj.ToUnknown*() and FromUnknown*(obj). r=nical

This commit is contained in:
Botond Ballo 2015-11-09 17:49:46 -05:00
parent 5d3596c6b7
commit 851b7a2860
2 changed files with 2 additions and 21 deletions

View File

@ -1006,9 +1006,8 @@ RenderTargetRect
Layer::TransformRectToRenderTarget(const LayerIntRect& aRect)
{
LayerRect rect(aRect);
RenderTargetRect quad = RenderTargetRect::FromUnknown(
GetEffectiveTransform().TransformBounds(
LayerPixel::ToUnknown(rect)));
RenderTargetRect quad = RenderTargetRect::FromUnknownRect(
GetEffectiveTransform().TransformBounds(rect.ToUnknownRect()));
return quad;
}

View File

@ -306,13 +306,6 @@ struct LayoutDevicePixel {
* 4) rasterizing at a different scale in the presence of some CSS transforms
*/
struct LayerPixel {
static gfx::IntRect ToUnknown(const LayerIntRect& aRect) {
return gfx::IntRect(aRect.x, aRect.y, aRect.width, aRect.height);
}
static gfx::Rect ToUnknown(const LayerRect& aRect) {
return gfx::Rect(aRect.x, aRect.y, aRect.width, aRect.height);
}
};
/*
@ -323,17 +316,6 @@ struct LayerPixel {
* have RenderTargetPixel == LayerPixel.
*/
struct RenderTargetPixel {
static gfx::IntRect ToUnknown(const RenderTargetIntRect& aRect) {
return gfx::IntRect(aRect.x, aRect.y, aRect.width, aRect.height);
}
static gfx::Rect ToUnknown(const RenderTargetRect& aRect) {
return gfx::Rect(aRect.x, aRect.y, aRect.width, aRect.height);
}
static RenderTargetRect FromUnknown(const gfx::Rect& aRect) {
return RenderTargetRect(aRect.x, aRect.y, aRect.width, aRect.height);
}
};
/*