Example #1
0
void Gradient::addColorStop(const Gradient::ColorStop& stop)
{
    m_stops.append(stop);

    m_stopsSorted = false;
    platformDestroy();
}
Example #2
0
FontData::~FontData()
{
    platformDestroy();

    // We only get deleted when the cache gets cleared.  Since the smallCapsRenderer is also in that cache,
    // it will be deleted then, so we don't need to do anything here.
}
Example #3
0
SimpleFontData::~SimpleFontData()
{
#if ENABLE(SVG_FONTS)
    if (!m_fontData)
#endif
        platformDestroy();

    if (!isCustomFont())
        GlyphPageTreeNode::pruneTreeFontData(this);
}
Example #4
0
SimpleFontData::~SimpleFontData()
{
    if (!m_fontData)
        platformDestroy();

    if (isCustomFont())
        GlyphPageTreeNode::pruneTreeCustomFontData(this);
    else
        GlyphPageTreeNode::pruneTreeFontData(this);
}
SimpleFontData::~SimpleFontData()
{
#if ENABLE(SVG_FONTS)
    if (!m_svgFontData || !m_svgFontData->svgFontFaceElement())
#endif
        platformDestroy();

    if (!isCustomFont())
        GlyphPageTreeNode::pruneTreeFontData(this);
}
Example #6
0
void Gradient::addColorStop(float value, const Color& color)
{
    float r;
    float g;
    float b;
    float a;
    color.getRGBA(r, g, b, a);
    m_stops.append(ColorStop(value, r, g, b, a));

    m_stopsSorted = false;
    platformDestroy();
}
Example #7
0
void Gradient::addColorStop(float value, const Color& color)
{
    m_stops.append(ColorStop(value,
        color.red() / 255.0f,
        color.green() / 255.0f,
        color.blue() / 255.0f,
        color.alpha() / 255.0f));

    m_stopsSorted = false;

    platformDestroy();
}
Example #8
0
SimpleFontData::~SimpleFontData()
{
#if ENABLE(SVG_FONTS)
    if (!m_svgFontData || !m_svgFontData->svgFontFaceElement())
#endif
        platformDestroy();

    if (!isCustomFont()) {
        if (m_smallCapsFontData)
            fontCache()->releaseFontData(m_smallCapsFontData);
        GlyphPageTreeNode::pruneTreeFontData(this);
    }
}
Example #9
0
cairo_pattern_t* Gradient::platformGradient(float globalAlpha)
{
    if (m_gradient && m_platformGradientAlpha == globalAlpha)
        return m_gradient;

    platformDestroy();
    m_platformGradientAlpha = globalAlpha;

    if (m_radial)
        m_gradient = cairo_pattern_create_radial(m_p0.x(), m_p0.y(), m_r0, m_p1.x(), m_p1.y(), m_r1);
    else
        m_gradient = cairo_pattern_create_linear(m_p0.x(), m_p0.y(), m_p1.x(), m_p1.y());

    Vector<ColorStop>::iterator stopIterator = m_stops.begin();
    while (stopIterator != m_stops.end()) {
#if !PLATFORM(JS) || USE(ACCELERATED_COMPOSITING)
        cairo_pattern_add_color_stop_rgba(m_gradient, stopIterator->stop,
                                          stopIterator->red, stopIterator->green, stopIterator->blue,
                                          stopIterator->alpha * globalAlpha);
#else
				// Swap the RGBA channels, canvas painting needs to be ARGB
				// but since the channels come out backwards as ABGR we just
				// swap the red and blue to get the same channel format without
				// haveing to go through all of the pixels and swap them post-blit.
				cairo_pattern_add_color_stop_rgba(m_gradient, stopIterator->stop,
																					stopIterator->blue, stopIterator->green, stopIterator->red,
																					stopIterator->alpha * globalAlpha);
#endif
        ++stopIterator;
    }

    switch (m_spreadMethod) {
    case SpreadMethodPad:
        cairo_pattern_set_extend(m_gradient, CAIRO_EXTEND_PAD);
        break;
    case SpreadMethodReflect:
        cairo_pattern_set_extend(m_gradient, CAIRO_EXTEND_REFLECT);
        break;
    case SpreadMethodRepeat:
        cairo_pattern_set_extend(m_gradient, CAIRO_EXTEND_REPEAT);
        break;
    }

    cairo_matrix_t matrix = m_gradientSpaceTransformation;
    cairo_matrix_invert(&matrix);
    cairo_pattern_set_matrix(m_gradient, &matrix);

    return m_gradient;
}
Example #10
0
void Gradient::addColorStop(float value, const Color& color)
{
    // FIXME: ExtendedColor - update this to support colors with color spaces.
    float r;
    float g;
    float b;
    float a;
    color.getRGBA(r, g, b, a);
    m_stops.append(ColorStop(value, r, g, b, a));

    m_stopsSorted = false;
    platformDestroy();

    invalidateHash();
}
Example #11
0
SimpleFontData::~SimpleFontData()
{
#if ENABLE(SVG_FONTS)
    if (!m_fontData)
#endif
        platformDestroy();

    if (!isCustomFont())
        GlyphPageTreeNode::pruneTreeFontData(this);
    
    //+EAWebKitChange - There have been cases where a glyph can render yet the prune for custom fonts has
    // not yet been called.  This can cause a rare crash since the simpleFontData has now been destroyed.
    //2/19/2013
     else
        GlyphPageTreeNode::pruneTreeCustomFontData(this);
    //-EAWebKitChange   
}
void NetscapePlugin::destroy()
{
    ASSERT(m_isStarted);

    // Stop all streams.
    stopAllStreams();

#if !PLUGIN_ARCHITECTURE(MAC)
    m_npWindow.window = 0;
    callSetWindow();
#endif

    NPP_Destroy(0);

    m_isStarted = false;
    m_pluginController = 0;

    platformDestroy();
}
void PluginControllerProxy::destroy()
{
    ASSERT(m_plugin);

    if (m_pluginDestructionProtectCount) {
        // We have plug-in code on the stack so we can't destroy it right now.
        // Destroy it later.
        m_shouldDestroyPluginWhenCountReachesZero = true;
        return;
    }

    m_plugin->destroy();
    m_plugin = 0;

    platformDestroy();

    // This will delete the plug-in controller proxy object.
    m_connection->removePluginControllerProxy(this);
}
Example #14
0
void NetscapePlugin::destroy()
{
    ASSERT(m_isStarted);

    // Stop all streams.
    stopAllStreams();

#if !PLUGIN_ARCHITECTURE(MAC) && !PLUGIN_ARCHITECTURE(X11)
    m_npWindow.window = 0;
    callSetWindow();
#endif

    NPP_Destroy(0);

    m_isStarted = false;

    platformDestroy();

    m_timers.clear();
}
cairo_pattern_t* Gradient::platformGradient(float globalAlpha)
{
    if (m_gradient && m_platformGradientAlpha == globalAlpha)
        return m_gradient;

    platformDestroy();
    m_platformGradientAlpha = globalAlpha;

    if (m_radial)
        m_gradient = cairo_pattern_create_radial(m_p0.x(), m_p0.y(), m_r0, m_p1.x(), m_p1.y(), m_r1);
    else
        m_gradient = cairo_pattern_create_linear(m_p0.x(), m_p0.y(), m_p1.x(), m_p1.y());

    Vector<ColorStop>::iterator stopIterator = m_stops.begin();
    while (stopIterator != m_stops.end()) {
        cairo_pattern_add_color_stop_rgba(m_gradient, stopIterator->stop,
                                          stopIterator->red, stopIterator->green, stopIterator->blue,
                                          stopIterator->alpha * globalAlpha);
        ++stopIterator;
    }

    switch (m_spreadMethod) {
    case SpreadMethodPad:
        cairo_pattern_set_extend(m_gradient, CAIRO_EXTEND_PAD);
        break;
    case SpreadMethodReflect:
        cairo_pattern_set_extend(m_gradient, CAIRO_EXTEND_REFLECT);
        break;
    case SpreadMethodRepeat:
        cairo_pattern_set_extend(m_gradient, CAIRO_EXTEND_REPEAT);
        break;
    }

    cairo_matrix_t matrix = m_gradientSpaceTransformation;
    cairo_matrix_invert(&matrix);
    cairo_pattern_set_matrix(m_gradient, &matrix);

    return m_gradient;
}
void PluginControllerProxy::destroy()
{
    ASSERT(m_plugin);

    if (m_pluginDestructionProtectCount) {
        // We have plug-in code on the stack so we can't destroy it right now.
        // Destroy it later.
        m_pluginDestroyTimer.startOneShot(0);
        return;
    }

    // Get the plug-in so we can pass it to removePluginControllerProxy. The pointer is only
    // used as an identifier so it's OK to just get a weak reference.
    Plugin* plugin = m_plugin.get();

    m_plugin->destroyPlugin();
    m_plugin = 0;

    platformDestroy();

    // This will delete the plug-in controller proxy object.
    m_connection->removePluginControllerProxy(this, plugin);
}
Example #17
0
GraphicsContext::~GraphicsContext()
{
    ASSERT(m_stack.isEmpty());
    ASSERT(!m_transparencyCount);
    platformDestroy();
}
Example #18
0
Gradient::~Gradient()
{
    platformDestroy();
}
Example #19
0
TestController::~TestController()
{
    WKIconDatabaseClose(WKContextGetIconDatabase(m_context.get()));

    platformDestroy();
}
Example #20
0
GraphicsContext::~GraphicsContext()
{
	ASSERT(m_stack.isEmpty());
	platformDestroy();
}
Example #21
0
WebsiteDataStore::~WebsiteDataStore()
{
    platformDestroy();
}
Example #22
0
GraphicsContext::~GraphicsContext()
{
    platformDestroy();
}
Example #23
0
Pattern::~Pattern()
{
    platformDestroy();
}
Example #24
0
QDirectFbScreenEGL::~QDirectFbScreenEGL()
{
    platformDestroy();
}
Example #25
0
JNIEXPORT void Java_com_studio_artaban_kaleidoscope_EngLibrary_destroy(JNIEnv* env, jobject obj) {
    platformDestroy();
}
Example #26
0
GraphicsSurface::~GraphicsSurface()
{
    platformDestroy();
}
Example #27
0
TestController::~TestController()
{
    platformDestroy();
}