Ejemplo n.º 1
0
ImageFrame& ImageFrame::operator=(const ImageFrame& other)
{
    if (this == &other)
        return *this;

    m_bitmap = other.m_bitmap->clone();
    // Keep the pixels locked since we will be writing directly into the
    // bitmap throughout this object's lifetime.
    m_bitmap->bitmap().lockPixels();
    setMemoryAllocator(other.allocator());
    setOriginalFrameRect(other.originalFrameRect());
    setStatus(other.status());
    setDuration(other.duration());
    setDisposalMethod(other.disposalMethod());
    setPremultiplyAlpha(other.premultiplyAlpha());
    // Be sure that this is called after we've called setStatus(), since we
    // look at our status to know what to do with the alpha value.
    setHasAlpha(other.hasAlpha());
    // Copy raw fields to avoid ASSERT failure in requiredPreviousFrameIndex().
    m_requiredPreviousFrameIndex = other.m_requiredPreviousFrameIndex;
#if !ASSERT_DISABLED
    m_requiredPreviousFrameIndexValid = other.m_requiredPreviousFrameIndexValid;
#endif
    return *this;
}
Ejemplo n.º 2
0
ImageFrame& ImageFrame::operator=(const ImageFrame& other)
{
    if (this == &other)
        return *this;

    copyBitmapData(other);
    setOriginalFrameRect(other.originalFrameRect());
    setStatus(other.status());
    setDuration(other.duration());
    setDisposalMethod(other.disposalMethod());
    setPremultiplyAlpha(other.premultiplyAlpha());
    return *this;
}
Ejemplo n.º 3
0
ImageFrame& ImageFrame::operator=(const ImageFrame& other)
{
    if (this == &other)
        return *this;

    m_bitmap = other.m_bitmap;
    // Keep the pixels locked since we will be writing directly into the
    // bitmap throughout this object's lifetime.
    m_bitmap.bitmap().lockPixels();
    setOriginalFrameRect(other.originalFrameRect());
    setStatus(other.status());
    setDuration(other.duration());
    setDisposalMethod(other.disposalMethod());
    setPremultiplyAlpha(other.premultiplyAlpha());
    return *this;
}
Ejemplo n.º 4
0
ImageFrame& ImageFrame::operator=(const ImageFrame& other)
{
    if (this == &other)
        return *this;

    m_bitmap = other.m_bitmap;
    // Keep the pixels locked since we will be writing directly into the
    // bitmap throughout this object's lifetime.
    m_bitmap.bitmap().lockPixels();
    setOriginalFrameRect(other.originalFrameRect());
    setStatus(other.status());
    setDuration(other.duration());
    setDisposalMethod(other.disposalMethod());
    setPremultiplyAlpha(other.premultiplyAlpha());
    // Be sure that this is called after we've called setStatus(), since we
    // look at our status to know what to do with the alpha value.
    setHasAlpha(other.hasAlpha());
    return *this;
}
Ejemplo n.º 5
0
ImageFrame& ImageFrame::operator=(const ImageFrame& other) {
  if (this == &other)
    return *this;

  m_bitmap = other.m_bitmap;
  // Keep the pixels locked since we will be writing directly into the
  // bitmap throughout this object's lifetime.
  m_bitmap.lockPixels();
  // Be sure to assign this before calling setStatus(), since setStatus() may
  // call notifyBitmapIfPixelsChanged().
  m_pixelsChanged = other.m_pixelsChanged;
  setMemoryAllocator(other.allocator());
  setOriginalFrameRect(other.originalFrameRect());
  setStatus(other.getStatus());
  setDuration(other.duration());
  setDisposalMethod(other.getDisposalMethod());
  setAlphaBlendSource(other.getAlphaBlendSource());
  setPremultiplyAlpha(other.premultiplyAlpha());
  // Be sure that this is called after we've called setStatus(), since we
  // look at our status to know what to do with the alpha value.
  setHasAlpha(other.hasAlpha());
  setRequiredPreviousFrameIndex(other.requiredPreviousFrameIndex());
  return *this;
}