Example #1
0
Bounds2i Film::GetSampleBounds() const {
    Bounds2f floatBounds(Floor(Point2f(croppedPixelBounds.pMin) +
                               Vector2f(0.5f, 0.5f) - filter->radius),
                         Ceil(Point2f(croppedPixelBounds.pMax) -
                              Vector2f(0.5f, 0.5f) + filter->radius));
    return (Bounds2i)floatBounds;
}
Example #2
0
TestPaintArtifact& TestPaintArtifact::foreignLayer(const FloatPoint& location, const IntSize& size, scoped_refptr<cc::Layer> layer)
{
    FloatRect floatBounds(location, FloatSize(size));
    OwnPtr<DummyRectClient> client = adoptPtr(new DummyRectClient(floatBounds, Color::transparent));
    m_displayItemList.allocateAndConstruct<ForeignLayerDisplayItem>(
        *client, DisplayItem::ForeignLayerFirst, std::move(layer), location, size);
    m_dummyClients.append(client.release());
    return *this;
}