Skip to content

Commit d3b8644

Browse files
committed
Remove unused code from software renderer (i.e. most of it, esp. color-key)
1 parent 8daf21a commit d3b8644

File tree

5 files changed

+10
-761
lines changed

5 files changed

+10
-761
lines changed

src/bitmap.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ bool Bitmap::GetTransparent() const {
129129
}
130130

131131
Color Bitmap::GetTransparentColor() const {
132-
return GetColor(colorkey());
132+
return Color();
133133
}
134134

135135
void Bitmap::SetTransparentColor(Color /* color */) {
@@ -269,14 +269,11 @@ void Bitmap::HSLBlit(int x, int y, Bitmap const& src, Rect const& src_rect_, dou
269269

270270
BitmapUtils* Bitmap::Begin() {
271271
BitmapUtils* bm_utils = BitmapUtils::Create(format, format, false);
272-
bm_utils->SetDstColorKey(colorkey());
273272
return bm_utils;
274273
}
275274

276275
BitmapUtils* Bitmap::Begin(Bitmap const& src) const {
277276
BitmapUtils* bm_utils = BitmapUtils::Create(format, src.format, true);
278-
bm_utils->SetDstColorKey(colorkey());
279-
bm_utils->SetSrcColorKey(src.colorkey());
280277
return bm_utils;
281278
}
282279

@@ -694,10 +691,6 @@ uint32_t Bitmap::amask() const {
694691
return pixel_format.a.mask;
695692
}
696693

697-
uint32_t Bitmap::colorkey() const {
698-
return 0;
699-
}
700-
701694
BitmapRef Bitmap::Resample(int scale_w, int scale_h, const Rect& src_rect) const {
702695
BitmapRef dst(new Bitmap(scale_w, scale_h, GetTransparent()));
703696

src/bitmap.h

-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ class Bitmap {
182182
uint32_t gmask() const;
183183
uint32_t bmask() const;
184184
uint32_t amask() const;
185-
uint32_t colorkey() const;
186185
uint8_t const* pointer(int x, int y) const;
187186
uint8_t* pointer(int x, int y);
188187

0 commit comments

Comments
 (0)