void WebViewEfl::setViewBackgroundColor(const WebCore::Color& color) { CoordinatedGraphicsScene* scene = coordinatedGraphicsScene(); if (!scene) return; scene->setViewBackgroundColor(color); }
WebCore::Color WebViewEfl::viewBackgroundColor() { CoordinatedGraphicsScene* scene = coordinatedGraphicsScene(); if (!scene) return Color(); return scene->viewBackgroundColor(); }
void WebView::setActive(bool active) { CoordinatedGraphicsScene* scene = coordinatedGraphicsScene(); if (!scene || scene->isActive() == active) return; scene->setActive(active); m_page->viewStateDidChange(ViewState::WindowIsActive); }
void WebView::paintToCurrentGLContext() { CoordinatedGraphicsScene* scene = coordinatedGraphicsScene(); if (!scene) return; const FloatRect& viewport = m_userViewportTransform.mapRect(IntRect(IntPoint(), m_size)); scene->paintToCurrentGLContext(transformToScene().toTransformationMatrix(), m_opacity, viewport, m_page->pageExtendedBackgroundColor(), m_page->drawsBackground(), m_contentPosition); }
void WebView::paintToCurrentGLContext() { CoordinatedGraphicsScene* scene = coordinatedGraphicsScene(); if (!scene) return; // FIXME: We need to clean up this code as it is split over CoordGfx and Page. scene->setDrawsBackground(m_page->drawsBackground()); const FloatRect& viewport = m_userViewportTransform.mapRect(IntRect(IntPoint(), m_size)); scene->paintToCurrentGLContext(transformToScene().toTransformationMatrix(), m_opacity, viewport); }
void QRawWebView::paint(const QMatrix4x4& transform, float opacity, unsigned paintFlags) { WebCore::CoordinatedGraphicsScene* scene = coordinatedGraphicsScene(); if (!scene) return; scene->setActive(true); WebCore::FloatRect rect(0, 0, d->m_size.width(), d->m_size.height()); scene->paintToCurrentGLContext(transform, opacity, transform.mapRect(rect), paintFlags); }
void WebViewEfl::paintToCairoSurface(cairo_surface_t* surface) { CoordinatedGraphicsScene* scene = coordinatedGraphicsScene(); if (!scene) return; PlatformContextCairo context(cairo_create(surface)); const FloatPoint& position = contentPosition(); double effectiveScale = m_page->deviceScaleFactor() * contentScaleFactor(); cairo_matrix_t transform = { effectiveScale, 0, 0, effectiveScale, - position.x() * m_page->deviceScaleFactor(), - position.y() * m_page->deviceScaleFactor() }; cairo_set_matrix(context.cr(), &transform); scene->paintToGraphicsContext(&context, m_page->pageExtendedBackgroundColor(), m_page->drawsBackground()); }
virtual void render(const RenderState& state) { TransformationMatrix renderMatrix; if (pageNode()->devicePixelRatio() != 1.0) { renderMatrix.scale(pageNode()->devicePixelRatio()); if (matrix()) renderMatrix.multiply(*matrix()); } else if (matrix()) renderMatrix = *matrix(); // When rendering to an intermediate surface, Qt will // mirror the projection matrix to fit on the destination coordinate system. const QMatrix4x4* projection = state.projectionMatrix; bool mirrored = projection && (*projection)(0, 0) * (*projection)(1, 1) - (*projection)(0, 1) * (*projection)(1, 0) > 0; // FIXME: Support non-rectangular clippings. coordinatedGraphicsScene()->paintToCurrentGLContext(renderMatrix, inheritedOpacity(), clipRect(), mirrored ? TextureMapper::PaintingMirrored : 0); }
~ContentsSGNode() { coordinatedGraphicsScene()->purgeGLResources(); }
ContentsSGNode(PassRefPtr<CoordinatedGraphicsScene> scene) : m_scene(scene) { coordinatedGraphicsScene()->setActive(true); }
void WebView::initialize() { m_page->initializeWebPage(); if (CoordinatedGraphicsScene* scene = coordinatedGraphicsScene()) scene->setActive(true); }
void WebView::exitAcceleratedCompositingMode() { if (CoordinatedGraphicsScene* scene = coordinatedGraphicsScene()) scene->setActive(false); }
void WebView::enterAcceleratedCompositingMode(const LayerTreeContext&) { if (CoordinatedGraphicsScene* scene = coordinatedGraphicsScene()) scene->setActive(true); }
void WebViewNix::didRelaunchProcess() { coordinatedGraphicsScene()->setActive(true); m_client.webProcessDidRelaunch(this); }
void QRawWebView::setActive(bool active) { d->m_active = active; d->m_webPageProxy->viewStateDidChange(WebKit::WebPageProxy::ViewWindowIsActive); coordinatedGraphicsScene()->setActive(active); }