@@ -37,12 +37,11 @@ static bool reset_return_false(SkBitmap* bm) {
37
37
return false ;
38
38
}
39
39
40
- SkBitmap::SkBitmap () : fFlags( 0 ) {}
40
+ SkBitmap::SkBitmap () {}
41
41
42
42
SkBitmap::SkBitmap (const SkBitmap& src)
43
43
: fPixelRef (src.fPixelRef )
44
44
, fPixmap (src.fPixmap )
45
- , fFlags (src.fFlags )
46
45
{
47
46
SkDEBUGCODE (src.validate ();)
48
47
SkDEBUGCODE (this ->validate ();)
@@ -51,11 +50,9 @@ SkBitmap::SkBitmap(const SkBitmap& src)
51
50
SkBitmap::SkBitmap (SkBitmap&& other)
52
51
: fPixelRef (std::move(other.fPixelRef ))
53
52
, fPixmap (std::move(other.fPixmap ))
54
- , fFlags (other.fFlags )
55
53
{
56
54
SkASSERT (!other.fPixelRef );
57
55
other.fPixmap .reset ();
58
- other.fFlags = 0 ;
59
56
}
60
57
61
58
SkBitmap::~SkBitmap () {}
@@ -64,7 +61,6 @@ SkBitmap& SkBitmap::operator=(const SkBitmap& src) {
64
61
if (this != &src) {
65
62
fPixelRef = src.fPixelRef ;
66
63
fPixmap = src.fPixmap ;
67
- fFlags = src.fFlags ;
68
64
}
69
65
SkDEBUGCODE (this ->validate ();)
70
66
return *this ;
@@ -74,10 +70,8 @@ SkBitmap& SkBitmap::operator=(SkBitmap&& other) {
74
70
if (this != &other) {
75
71
fPixelRef = std::move (other.fPixelRef );
76
72
fPixmap = std::move (other.fPixmap );
77
- fFlags = other.fFlags ;
78
73
SkASSERT (!other.fPixelRef );
79
74
other.fPixmap .reset ();
80
- other.fFlags = 0 ;
81
75
}
82
76
return *this ;
83
77
}
@@ -91,7 +85,6 @@ void SkBitmap::swap(SkBitmap& other) {
91
85
void SkBitmap::reset () {
92
86
fPixelRef = nullptr ; // Free pixels.
93
87
fPixmap .reset ();
94
- fFlags = 0 ;
95
88
}
96
89
97
90
void SkBitmap::getBounds (SkRect* bounds) const {
@@ -381,18 +374,6 @@ void SkBitmap::setImmutable() {
381
374
}
382
375
}
383
376
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
-
396
377
void * SkBitmap::getAddr (int x, int y) const {
397
378
SkASSERT ((unsigned )x < (unsigned )this ->width ());
398
379
SkASSERT ((unsigned )y < (unsigned )this ->height ());
@@ -452,7 +433,6 @@ bool SkBitmap::extractSubset(SkBitmap* result, const SkIRect& subset) const {
452
433
453
434
SkBitmap dst;
454
435
dst.setInfo (this ->info ().makeDimensions (r.size ()), this ->rowBytes ());
455
- dst.setIsVolatile (this ->isVolatile ());
456
436
457
437
if (fPixelRef ) {
458
438
SkIPoint origin = this ->pixelRefOrigin ();
@@ -595,8 +575,6 @@ void SkBitmap::validate() const {
595
575
this ->info ().validate ();
596
576
597
577
SkASSERT (this ->info ().validRowBytes (this ->rowBytes ()));
598
- uint8_t allFlags = kImageIsVolatile_Flag ;
599
- SkASSERT ((~allFlags & fFlags ) == 0 );
600
578
601
579
if (fPixelRef && fPixelRef ->pixels ()) {
602
580
SkASSERT (this ->getPixels ());
0 commit comments