• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/WebCore-7537.78.1/html/canvas/

Lines Matching +refs:save +refs:buffer +refs:state

141     // Ensure that the state stack in the ImageBuffer's context
289 m_stateStack.append(state());
291 context->save();
304 m_path.transform(state().m_transform);
306 m_path.transform(state().m_transform.inverse());
318 if (state().m_strokeStyle.isValid() && state().m_strokeStyle.isEquivalentColor(style))
330 State& state = modifiableState();
331 state.m_strokeStyle = style;
335 state.m_strokeStyle.applyStrokeColor(c);
336 state.m_unparsedStrokeColor = String();
344 if (state().m_fillStyle.isValid() && state().m_fillStyle.isEquivalentColor(style))
356 State& state = modifiableState();
357 state.m_fillStyle = style;
361 state.m_fillStyle.applyFillColor(c);
362 state.m_unparsedFillColor = String();
367 return state().m_lineWidth;
374 if (state().m_lineWidth == width)
386 return lineCapName(state().m_lineCap);
394 if (state().m_lineCap == cap)
406 return lineJoinName(state().m_lineJoin);
414 if (state().m_lineJoin == join)
426 return state().m_miterLimit;
433 if (state().m_miterLimit == limit)
445 return state().m_shadowOffset.width();
452 if (state().m_shadowOffset.width() == x)
461 return state().m_shadowOffset.height();
468 if (state().m_shadowOffset.height() == y)
477 return state().m_shadowBlur;
484 if (state().m_shadowBlur == blur)
493 return Color(state().m_shadowColor).serialized();
501 if (state().m_shadowColor == rgba)
510 return state().m_lineDash;
550 return state().m_lineDashOffset;
555 if (!std::isfinite(offset) || state().m_lineDashOffset == offset)
578 DashArray convertedLineDash(state().m_lineDash.size());
579 for (size_t i = 0; i < state().m_lineDash.size(); ++i)
580 convertedLineDash[i] = static_cast<DashArrayElement>(state().m_lineDash[i]);
581 c->setLineDash(convertedLineDash, state().m_lineDashOffset);
586 return state().m_globalAlpha;
593 if (state().m_globalAlpha == alpha)
605 return compositeOperatorName(state().m_globalComposite, state().m_globalBlend);
614 if ((state().m_globalComposite == op) && (state().m_globalBlend == blendMode))
630 if (!state().m_invertibleCTM)
636 AffineTransform newTransform = state().m_transform;
638 if (state().m_transform == newTransform)
658 if (!state().m_invertibleCTM)
664 AffineTransform newTransform = state().m_transform;
666 if (state().m_transform == newTransform)
686 if (!state().m_invertibleCTM)
692 AffineTransform newTransform = state().m_transform;
694 if (state().m_transform == newTransform)
714 if (!state().m_invertibleCTM)
721 AffineTransform newTransform = state().m_transform * transform;
722 if (state().m_transform == newTransform)
746 AffineTransform ctm = state().m_transform;
762 if (color == state().m_unparsedStrokeColor)
771 if (state().m_strokeStyle.isValid() && state().m_strokeStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, 1.0f))
783 if (state().m_strokeStyle.isValid() && state().m_strokeStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, alpha))
790 if (state().m_strokeStyle.isValid() && state().m_strokeStyle.isEquivalentRGBA(r, g, b, a))
797 if (state().m_strokeStyle.isValid() && state().m_strokeStyle.isEquivalentCMYKA(c, m, y, k, a))
804 if (color == state().m_unparsedFillColor)
813 if (state().m_fillStyle.isValid() && state().m_fillStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, 1.0f))
825 if (state().m_fillStyle.isValid() && state().m_fillStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, alpha))
832 if (state().m_fillStyle.isValid() && state().m_fillStyle.isEquivalentRGBA(r, g, b, a))
839 if (state().m_fillStyle.isValid() && state().m_fillStyle.isEquivalentCMYKA(c, m, y, k, a))
917 if (!state().m_invertibleCTM)
932 if (isFullCanvasCompositeMode(state().m_globalComposite)) {
935 } else if (state().m_globalComposite == CompositeCopy) {
957 if (!state().m_invertibleCTM)
983 if (!state().m_invertibleCTM)
1003 if (!state().m_invertibleCTM)
1007 AffineTransform ctm = state().m_transform;
1025 if (!state().m_invertibleCTM)
1029 AffineTransform ctm = state().m_transform;
1045 if (!state().m_invertibleCTM)
1051 context->save();
1055 if (state().m_globalAlpha != 1) {
1057 context->save();
1062 if (state().m_globalComposite != CompositeSourceOver) {
1064 context->save();
1083 if (!state().m_invertibleCTM)
1098 } else if (isFullCanvasCompositeMode(state().m_globalComposite)) {
1101 } else if (state().m_globalComposite == CompositeCopy) {
1119 if (!state().m_invertibleCTM)
1121 if (!(state().m_lineWidth >= 0))
1132 boundingRect.inflate(state().m_lineWidth / 2);
1134 c->strokeRect(rect, state().m_lineWidth);
1186 if (state().m_shadowOffset == offset && state().m_shadowBlur == blur && state().m_shadowColor == color)
1205 float width = state().m_shadowOffset.width();
1206 float height = state().m_shadowOffset.height();
1207 c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
1214 return alphaChannel(state().m_shadowColor) && (state().m_shadowBlur || !state().m_shadowOffset.isZero());
1271 drawImage(image, srcRect, dstRect, state().m_globalComposite, state().m_globalBlend, ec);
1307 if (!state().m_invertibleCTM)
1378 if (!state().m_invertibleCTM)
1382 ImageBuffer* buffer = sourceCanvas->buffer();
1383 if (!buffer)
1400 c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().m_globalComposite, state().m_globalBlend);
1402 } else if (isFullCanvasCompositeMode(state().m_globalComposite)) {
1403 fullCanvasCompositedDrawImage(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().m_globalComposite);
1405 } else if (state().m_globalComposite == CompositeCopy) {
1407 c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().m_globalComposite, state().m_globalBlend);
1410 c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().m_globalComposite, state().m_globalBlend);
1469 if (!state().m_invertibleCTM)
1515 c->save();
1524 transformed.transform(state().m_transform);
1540 return state().m_transform.mapQuad(quad).containsQuad(canvasQuad);
1562 void CanvasRenderingContext2D::compositeBuffer(ImageBuffer* buffer, const IntRect& bufferRect, CompositeOperator op)
1571 c->save();
1575 c->save();
1580 c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, bufferRect.location(), state().m_globalComposite);
1605 OwnPtr<ImageBuffer> buffer = createCompositingBuffer(bufferRect);
1606 if (!buffer)
1617 buffer->context()->translate(-transformedAdjustedRect.location().x(), -transformedAdjustedRect.location().y());
1618 buffer->context()->translate(croppedOffset.width(), croppedOffset.height());
1619 buffer->context()->concatCTM(effectiveTransform);
1620 drawImageToContext(image, buffer->context(), styleColorSpace, adjustedDest, src, CompositeSourceOver);
1622 compositeBuffer(buffer.get(), bufferRect, op);
1627 ASSERT(isFullCanvasCompositeMode(state().m_globalComposite));
1635 OwnPtr<ImageBuffer> buffer = createCompositingBuffer(bufferRect);
1636 if (!buffer)
1642 buffer->context()->setCompositeOperation(CompositeSourceOver);
1643 modifiableState().m_fillStyle.applyFillColor(buffer->context());
1644 buffer->context()->fillPath(path);
1646 compositeBuffer(buffer.get(), bufferRect, state().m_globalComposite);
1742 if (!state().m_invertibleCTM)
1760 AffineTransform ctm = state().m_transform;
1764 if (options & CanvasDidDrawApplyShadow && alphaChannel(state().m_shadowColor)) {
1767 shadowRect.move(state().m_shadowOffset);
1768 shadowRect.inflate(state().m_shadowBlur);
1880 ImageBuffer* buffer = canvas()->buffer();
1881 if (!buffer)
1884 RefPtr<Uint8ClampedArray> byteArray = buffer->getUnmultipliedImageData(imageDataRect, coordinateSystem);
1932 ImageBuffer* buffer = canvas()->buffer();
1933 if (!buffer)
1951 destRect.intersect(IntRect(IntPoint(), coordinateSystem == ImageBuffer::LogicalCoordinateSystem ? buffer->logicalSize() : buffer->internalSize()));
1957 buffer->putByteArray(Unmultiplied, data->data(), IntSize(data->width(), data->height()), sourceRect, IntPoint(destOffset), coordinateSystem);
1969 if (!state().m_realizedFont)
1973 const FontDescription& fontDescription = state().m_font.fontDescription();
1983 for (unsigned i = 0; i < state().m_font.familyCount(); ++i) {
1987 String family = state().m_font.familyAt(i);
2002 if (newFont == state().m_unparsedFont && state().m_realizedFont)
2061 return textAlignName(state().m_textAlign);
2069 if (state().m_textAlign == align)
2077 return textBaselineName(state().m_textBaseline);
2085 if (state().m_textBaseline == baseline)
2147 if (!state().m_invertibleCTM)
2181 switch (state().m_textBaseline) {
2204 TextAlign align = state().m_textAlign;
2228 const CanvasStyle& drawStyle = fill ? state().m_fillStyle : state().m_strokeStyle;
2293 float delta = state().m_lineWidth / 2;
2294 if (state().m_lineJoin == MiterJoin)
2295 delta *= state().m_miterLimit;
2296 else if (state().m_lineCap == SquareCap)
2306 if (!state().m_realizedFont)
2307 setFont(state().m_unparsedFont);
2308 return state().m_font;
2314 return canvas()->buffer() ? canvas()->buffer()->platformLayer() : 0;
2320 return state().m_imageSmoothingEnabled;
2325 if (enabled == state().m_imageSmoothingEnabled)