Esempio n. 1
0
void NonCompositedContentHost::paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext& context, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect& clipRect)
{
    // On non-android platforms, we want to render text with subpixel antialiasing on the root layer
    // so long as the root is opaque. On android all text is grayscale.
#if !OS(ANDROID)
    if (m_opaque)
        context.platformContext()->setDrawingToImageBuffer(false);
#endif
    context.translate(-m_layerAdjust);
    WebCore::IntRect adjustedClipRect = clipRect;
    adjustedClipRect.move(m_layerAdjust);
    m_webView->paintRootLayer(context, adjustedClipRect);
}
Esempio n. 2
0
void ShareableBitmap::paint(WebCore::GraphicsContext& context, float scaleFactor, const IntPoint& destination, const IntRect& source)
{
    paintImage(context.platformContext(), makeCGImageCopy().get(), scaleFactor, destination, source);
}