src/share/native/sun/java2d/cmm/lcms/cmsplugin.c
Print this page
*** 710,728 ****
return &globalContext;
}
// Internal: get the memory area associanted with each context client
! // Returns the block assigned to the specific zone.
void* _cmsContextGetClientChunk(cmsContext ContextID, _cmsMemoryClient mc)
{
struct _cmsContext_struct* ctx;
void *ptr;
! if (mc < 0 || mc >= MemoryClientMax) {
! cmsSignalError(ContextID, cmsERROR_RANGE, "Bad context client");
! return NULL;
}
ctx = _cmsGetContext(ContextID);
ptr = ctx ->chunks[mc];
--- 710,734 ----
return &globalContext;
}
// Internal: get the memory area associanted with each context client
! // Returns the block assigned to the specific zone. Never return NULL.
void* _cmsContextGetClientChunk(cmsContext ContextID, _cmsMemoryClient mc)
{
struct _cmsContext_struct* ctx;
void *ptr;
! if ((int) mc < 0 || mc >= MemoryClientMax) {
!
! cmsSignalError(ContextID, cmsERROR_INTERNAL, "Bad context client -- possible corruption");
!
! // This is catastrophic. Should never reach here
! _cmsAssert(0);
!
! // Reverts to global context
! return globalContext.chunks[UserPtr];
}
ctx = _cmsGetContext(ContextID);
ptr = ctx ->chunks[mc];
*** 907,917 ****
return (cmsContext) ctx;
}
!
static
struct _cmsContext_struct* FindPrev(struct _cmsContext_struct* id)
{
struct _cmsContext_struct* prev;
--- 913,923 ----
return (cmsContext) ctx;
}
! /*
static
struct _cmsContext_struct* FindPrev(struct _cmsContext_struct* id)
{
struct _cmsContext_struct* prev;
*** 924,933 ****
--- 930,940 ----
return prev;
}
return NULL; // List is empty or only one element!
}
+ */
// Frees any resources associated with the given context,
// and destroys the context placeholder.
// The ContextID can no longer be used in any THR operation.
void CMSEXPORT cmsDeleteContext(cmsContext ContextID)