void ImageFrame::setStatus(Status status) { m_status = status; if (m_status == FrameComplete) { m_bitmap.setAlphaType(m_hasAlpha ? kPremul_SkAlphaType : kOpaque_SkAlphaType); // Send pending pixels changed notifications now, because we can't do this after // the bitmap has been marked immutable. notifyBitmapIfPixelsChanged(); m_bitmap.setImmutable(); // Tell the bitmap it's done. } }
void ImageFrame::setStatus(Status status) { m_status = status; if (m_status == FrameComplete) { m_bitmap.setAlphaType(computeAlphaType()); // Send pending pixels changed notifications now, because we can't do // this after the bitmap has been marked immutable. We don't set the // bitmap immutable here because it would defeat // takeBitmapDataIfWritable(). Instead we let the bitmap stay mutable // until someone calls finalizePixelsAndGetImage() to actually get the // SkImage. notifyBitmapIfPixelsChanged(); } }