Further simplification following new minimum supported macOS version: 10.7 - cont'd
This commit is contained in:
parent
6d09a39222
commit
f2424bf1fc
@ -72,9 +72,8 @@ void Fl_Cocoa_Window_Driver::flush_overlay()
|
|||||||
|
|
||||||
void Fl_Cocoa_Window_Driver::draw_begin()
|
void Fl_Cocoa_Window_Driver::draw_begin()
|
||||||
{
|
{
|
||||||
if (!Fl_Surface_Device::surface()->driver()->has_feature(Fl_Graphics_Driver::NATIVE)) return;
|
if (shape_data_ && Fl_Surface_Device::surface()->driver()->has_feature(Fl_Graphics_Driver::NATIVE)) {
|
||||||
CGContextRef my_gc = (CGContextRef)Fl_Surface_Device::surface()->driver()->gc();
|
CGContextRef my_gc = (CGContextRef)Fl_Surface_Device::surface()->driver()->gc();
|
||||||
if (shape_data_) {
|
|
||||||
if (shape_data_->mask) {
|
if (shape_data_->mask) {
|
||||||
CGContextClipToMask(my_gc, CGRectMake(0,0,w(),h()), shape_data_->mask); // requires Mac OS 10.4
|
CGContextClipToMask(my_gc, CGRectMake(0,0,w(),h()), shape_data_->mask); // requires Mac OS 10.4
|
||||||
}
|
}
|
||||||
@ -85,9 +84,9 @@ void Fl_Cocoa_Window_Driver::draw_begin()
|
|||||||
|
|
||||||
void Fl_Cocoa_Window_Driver::draw_end()
|
void Fl_Cocoa_Window_Driver::draw_end()
|
||||||
{
|
{
|
||||||
if (Fl_Surface_Device::surface()->driver()->has_feature(Fl_Graphics_Driver::NATIVE)) {
|
if (shape_data_ && Fl_Surface_Device::surface()->driver()->has_feature(Fl_Graphics_Driver::NATIVE)) {
|
||||||
CGContextRef my_gc = (CGContextRef)Fl_Surface_Device::surface()->driver()->gc();
|
CGContextRef my_gc = (CGContextRef)Fl_Surface_Device::surface()->driver()->gc();
|
||||||
if (shape_data_) CGContextRestoreGState(my_gc);
|
CGContextRestoreGState(my_gc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -43,12 +43,6 @@ char Fl_Quartz_Graphics_Driver::can_do_alpha_blending() {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bmProviderRelease (void *src, const void *data, size_t size) {
|
|
||||||
CFIndex count = CFGetRetainCount(src);
|
|
||||||
CFRelease(src);
|
|
||||||
if(count == 1) free((void*)data);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Reference to the current CGContext
|
/* Reference to the current CGContext
|
||||||
For back-compatibility only. The preferred procedure to get this reference is
|
For back-compatibility only. The preferred procedure to get this reference is
|
||||||
Fl_Surface_Device::surface()->driver()->gc().
|
Fl_Surface_Device::surface()->driver()->gc().
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user