mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
do we really need to create a new colour space to clear the background? We can just use the generic RGB space.
This commit is contained in:
parent
0113a991a1
commit
31d56d08ab
@ -2705,9 +2705,8 @@ osx_release_twirl_images() {
|
|||||||
void PPInstance::
|
void PPInstance::
|
||||||
paint_twirl_osx_cgcontext(CGContextRef context) {
|
paint_twirl_osx_cgcontext(CGContextRef context) {
|
||||||
// Clear the whole region to the bgcolor before beginning.
|
// Clear the whole region to the bgcolor before beginning.
|
||||||
CGFloat bg_components[] = { _bgcolor_r / 255.0f, _bgcolor_g / 255.0f, _bgcolor_b / 255.0f, 1 };
|
CGColorRef bg = CGColorCreateGenericRGB(
|
||||||
CGColorSpaceRef rgb_space = CGColorSpaceCreateDeviceRGB();
|
_bgcolor_r / 255.0f, _bgcolor_g / 255.0f, _bgcolor_b / 255.0f, 1);
|
||||||
CGColorRef bg = CGColorCreate(rgb_space, bg_components);
|
|
||||||
|
|
||||||
CGRect region = { { 0, 0 }, { _window.width, _window.height } };
|
CGRect region = { { 0, 0 }, { _window.width, _window.height } };
|
||||||
CGContextBeginPath(context);
|
CGContextBeginPath(context);
|
||||||
@ -2716,7 +2715,6 @@ paint_twirl_osx_cgcontext(CGContextRef context) {
|
|||||||
CGContextFillPath(context);
|
CGContextFillPath(context);
|
||||||
|
|
||||||
CGColorRelease(bg);
|
CGColorRelease(bg);
|
||||||
CGColorSpaceRelease(rgb_space);
|
|
||||||
|
|
||||||
if (_failed) {
|
if (_failed) {
|
||||||
// Draw the failed icon if something went wrong.
|
// Draw the failed icon if something went wrong.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user