diff options
Diffstat (limited to 'src/xrender')
-rw-r--r-- | src/xrender/cdxrender.c | 12 | ||||
-rw-r--r-- | src/xrender/cdxrplus.c | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/xrender/cdxrender.c b/src/xrender/cdxrender.c index dfd4370..421dfa5 100644 --- a/src/xrender/cdxrender.c +++ b/src/xrender/cdxrender.c @@ -1013,11 +1013,11 @@ static void xrInitTableDBUFFER(cdCanvas* canvas) cdContext* cdContextDBufferPlus(void) { - if (!cdDBufferContext.plus) + if (!(cdDBufferContext.type & CD_CTX_PLUS)) { int old_plus = cdUseContextPlus(0); /* disable context plus */ cdDBufferContext = *cdContextDBuffer(); /* copy original context */ - cdDBufferContext.plus = 1; /* mark as plus */ + cdDBufferContext.type |= CD_CTX_PLUS; /* mark as plus */ cdDBufferContext.caps |= CD_CAP_FPRIMTIVES; /* save original methods */ @@ -1049,7 +1049,7 @@ static void xrInitTableNATIVE(cdCanvas* canvas) cdContext* cdContextNativeWindowPlus(void) { - if (!cdNativeWindowContext.plus) + if (!(cdNativeWindowContext.type & CD_CTX_PLUS)) { int old_plus = cdUseContextPlus(0); cdNativeWindowContext = *cdContextNativeWindow(); @@ -1057,7 +1057,7 @@ cdContext* cdContextNativeWindowPlus(void) cdinittableNATIVE = cdNativeWindowContext.cxInitTable; cdNativeWindowContext.cxCreateCanvas = xrCreateCanvasNATIVE; cdNativeWindowContext.cxInitTable = xrInitTableNATIVE; - cdNativeWindowContext.plus = 1; + cdNativeWindowContext.type |= CD_CTX_PLUS; cdNativeWindowContext.caps |= CD_CAP_FPRIMTIVES; cdUseContextPlus(old_plus); } @@ -1080,7 +1080,7 @@ static void xrInitTableIMAGE(cdCanvas* canvas) cdContext* cdContextImagePlus(void) { - if (!cdImageContext.plus) + if (!(cdImageContext.type & CD_CTX_PLUS)) { int old_plus = cdUseContextPlus(0); cdImageContext = *cdContextImage(); @@ -1088,7 +1088,7 @@ cdContext* cdContextImagePlus(void) cdinittableIMAGE = cdImageContext.cxInitTable; cdImageContext.cxCreateCanvas = xrCreateCanvasIMAGE; cdImageContext.cxInitTable = xrInitTableIMAGE; - cdImageContext.plus = 1; + cdImageContext.type |= CD_CTX_PLUS; cdImageContext.caps |= CD_CAP_FPRIMTIVES; cdUseContextPlus(old_plus); } diff --git a/src/xrender/cdxrplus.c b/src/xrender/cdxrplus.c index 589aa3c..af3bbde 100644 --- a/src/xrender/cdxrplus.c +++ b/src/xrender/cdxrplus.c @@ -15,7 +15,7 @@ cdContext* cdContextDBufferPlus(void); void cdInitContextPlus(void) { - cdContext* ctx_list[NUM_CONTEXTPLUS]; + cdContext* ctx_list[CD_CTXPLUS_COUNT]; memset(ctx_list, 0, sizeof(ctx_list)); ctx_list[CD_CTXPLUS_NATIVEWINDOW] = cdContextNativeWindowPlus(); |