void GraphicsContext::fillRoundedRect(const FloatRoundedRect& rect, const Color& color, BlendMode blendMode) { if (rect.isRounded()) { setCompositeOperation(compositeOperation(), blendMode); platformFillRoundedRect(rect, color); setCompositeOperation(compositeOperation()); } else fillRect(rect.rect(), color, compositeOperation(), blendMode); }
void GraphicsContext::fillRoundedRect(const RoundedRect& rect, const Color& color, ColorSpace colorSpace, BlendMode blendMode) { if (rect.isRounded()) { setCompositeOperation(compositeOperation(), blendMode); fillRoundedRect(rect.rect(), rect.radii().topLeft(), rect.radii().topRight(), rect.radii().bottomLeft(), rect.radii().bottomRight(), color, colorSpace); setCompositeOperation(compositeOperation()); } else fillRect(rect.rect(), color, colorSpace, compositeOperation(), blendMode); }
void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorSpace styleColorSpace, CompositeOperator op) { if (paintingDisabled()) return; CompositeOperator previousOperator = compositeOperation(); setCompositeOperation(op); fillRect(rect, color, styleColorSpace); setCompositeOperation(previousOperator); }
void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, CompositeOperator op, BlendMode blendMode) { if (paintingDisabled()) return; CompositeOperator previousOperator = compositeOperation(); setCompositeOperation(op, blendMode); fillRect(rect, color); setCompositeOperation(previousOperator); }
void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, CompositeOperator op, BlendMode blendMode) { if (paintingDisabled()) return; if (isRecording()) { m_displayListRecorder->fillRect(rect, color, op, blendMode); return; } CompositeOperator previousOperator = compositeOperation(); setCompositeOperation(op, blendMode); fillRect(rect, color); setCompositeOperation(previousOperator); }
void PluginProxy::paint(GraphicsContext* graphicsContext, const IntRect& dirtyRect) { if (!needsBackingStore() || !m_backingStore) return; if (!m_pluginBackingStoreContainsValidData) { m_connection->connection()->sendSync(Messages::PluginControllerProxy::PaintEntirePlugin(), Messages::PluginControllerProxy::PaintEntirePlugin::Reply(), m_pluginInstanceID); // Blit the plug-in backing store into our own backing store. auto graphicsContext = m_backingStore->createGraphicsContext(); graphicsContext->applyDeviceScaleFactor(contentsScaleFactor()); graphicsContext->setCompositeOperation(CompositeCopy); m_pluginBackingStore->paint(*graphicsContext, contentsScaleFactor(), IntPoint(), pluginBounds()); m_pluginBackingStoreContainsValidData = true; } m_backingStore->paint(*graphicsContext, contentsScaleFactor(), dirtyRect.location(), dirtyRect); if (m_waitingForPaintInResponseToUpdate) { m_waitingForPaintInResponseToUpdate = false; m_connection->connection()->send(Messages::PluginControllerProxy::DidUpdate(), m_pluginInstanceID); } }
void GraphicsContext::fillRoundedRect(const FloatRoundedRect& rect, const Color& color, BlendMode blendMode) { if (paintingDisabled()) return; if (isRecording()) { m_displayListRecorder->fillRoundedRect(rect, color, blendMode); return; } if (rect.isRounded()) { setCompositeOperation(compositeOperation(), blendMode); platformFillRoundedRect(rect, color); setCompositeOperation(compositeOperation()); } else fillRect(rect.rect(), color, compositeOperation(), blendMode); }
void PluginProxy::update(const IntRect& paintedRect) { if (paintedRect == pluginBounds()) m_pluginBackingStoreContainsValidData = true; if (m_backingStore) { // Blit the plug-in backing store into our own backing store. auto graphicsContext = m_backingStore->createGraphicsContext(); graphicsContext->applyDeviceScaleFactor(contentsScaleFactor()); graphicsContext->setCompositeOperation(CompositeCopy); m_pluginBackingStore->paint(*graphicsContext, contentsScaleFactor(), paintedRect.location(), paintedRect); } // Ask the controller to invalidate the rect for us. m_waitingForPaintInResponseToUpdate = true; controller()->invalidate(paintedRect); }