[Chromium] NativeImageSkia should mark SkBitmaps as immutable
https://bugs.webkit.org/show_bug.cgi?id=74962

Removed m_isDataComplete from class NativeImageSkia. Instead, data
completeness will be tracked through SkBitmap::setImmutable/
isImmutable.  The immutable state signifies that the pixel data
will no longer change for the lifetime of the bitmap, which corresponds
to the semantic of the old m_isDataComplete member. setImmutable is
also called on the cached resized bitmap, since it too is invariant for
its life time. Temporary resized bitmaps are also marked as immutable
since they technically are.

Patch by Justin Novosad <junov@chromium.org> on 2012-01-05
Reviewed by Stephen White.

* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::NativeImageSkia):
(WebCore::NativeImageSkia::resizedBitmap):
(WebCore::NativeImageSkia::shouldCacheResampling):
* platform/graphics/skia/NativeImageSkia.h:
(WebCore::NativeImageSkia::setDataComplete):
(WebCore::NativeImageSkia::isDataComplete):

git-svn-id: svn://svn.chromium.org/blink/trunk@104246 bbb929c8-8fbe-4397-9dbb-9b2b20218538
3 files changed
tree: 0f12367a1e272ca072fdb9b14cc1faf581d95664
  1. third_party/