@@ -37,12 +37,11 @@ static bool reset_return_false(SkBitmap* bm) {
3737 return false ;
3838}
3939
40- SkBitmap::SkBitmap () : fFlags( 0 ) {}
40+ SkBitmap::SkBitmap () {}
4141
4242SkBitmap::SkBitmap (const SkBitmap& src)
4343 : fPixelRef (src.fPixelRef )
4444 , fPixmap (src.fPixmap )
45- , fFlags (src.fFlags )
4645{
4746 SkDEBUGCODE (src.validate ();)
4847 SkDEBUGCODE (this ->validate ();)
@@ -51,11 +50,9 @@ SkBitmap::SkBitmap(const SkBitmap& src)
5150SkBitmap::SkBitmap (SkBitmap&& other)
5251 : fPixelRef (std::move(other.fPixelRef ))
5352 , fPixmap (std::move(other.fPixmap ))
54- , fFlags (other.fFlags )
5553{
5654 SkASSERT (!other.fPixelRef );
5755 other.fPixmap .reset ();
58- other.fFlags = 0 ;
5956}
6057
6158SkBitmap::~SkBitmap () {}
@@ -64,7 +61,6 @@ SkBitmap& SkBitmap::operator=(const SkBitmap& src) {
6461 if (this != &src) {
6562 fPixelRef = src.fPixelRef ;
6663 fPixmap = src.fPixmap ;
67- fFlags = src.fFlags ;
6864 }
6965 SkDEBUGCODE (this ->validate ();)
7066 return *this ;
@@ -74,10 +70,8 @@ SkBitmap& SkBitmap::operator=(SkBitmap&& other) {
7470 if (this != &other) {
7571 fPixelRef = std::move (other.fPixelRef );
7672 fPixmap = std::move (other.fPixmap );
77- fFlags = other.fFlags ;
7873 SkASSERT (!other.fPixelRef );
7974 other.fPixmap .reset ();
80- other.fFlags = 0 ;
8175 }
8276 return *this ;
8377}
@@ -91,7 +85,6 @@ void SkBitmap::swap(SkBitmap& other) {
9185void SkBitmap::reset () {
9286 fPixelRef = nullptr ; // Free pixels.
9387 fPixmap .reset ();
94- fFlags = 0 ;
9588}
9689
9790void SkBitmap::getBounds (SkRect* bounds) const {
@@ -381,18 +374,6 @@ void SkBitmap::setImmutable() {
381374 }
382375}
383376
384- bool SkBitmap::isVolatile () const {
385- return (fFlags & kImageIsVolatile_Flag ) != 0 ;
386- }
387-
388- void SkBitmap::setIsVolatile (bool isVolatile) {
389- if (isVolatile) {
390- fFlags |= kImageIsVolatile_Flag ;
391- } else {
392- fFlags &= ~kImageIsVolatile_Flag ;
393- }
394- }
395-
396377void * SkBitmap::getAddr (int x, int y) const {
397378 SkASSERT ((unsigned )x < (unsigned )this ->width ());
398379 SkASSERT ((unsigned )y < (unsigned )this ->height ());
@@ -452,7 +433,6 @@ bool SkBitmap::extractSubset(SkBitmap* result, const SkIRect& subset) const {
452433
453434 SkBitmap dst;
454435 dst.setInfo (this ->info ().makeDimensions (r.size ()), this ->rowBytes ());
455- dst.setIsVolatile (this ->isVolatile ());
456436
457437 if (fPixelRef ) {
458438 SkIPoint origin = this ->pixelRefOrigin ();
@@ -595,8 +575,6 @@ void SkBitmap::validate() const {
595575 this ->info ().validate ();
596576
597577 SkASSERT (this ->info ().validRowBytes (this ->rowBytes ()));
598- uint8_t allFlags = kImageIsVolatile_Flag ;
599- SkASSERT ((~allFlags & fFlags ) == 0 );
600578
601579 if (fPixelRef && fPixelRef ->pixels ()) {
602580 SkASSERT (this ->getPixels ());
0 commit comments