Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ SpaceBeforeAssignmentOperators: true

ContinuationIndentWidth: 4
SpaceBeforeParens: ControlStatements
SortIncludes: false
...

@DHowett-MSFT Dustin L. Howett (MSFT) (DHowett-MSFT) Oct 11, 2016 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been a pain in my side for literal years. #Resolved

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:D


In reply to: 82900097 [](ancestors = 82900097)

@rajsesh Raj Seshasankaran (rajsesh) Oct 12, 2016 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 #Closed

91 changes: 8 additions & 83 deletions Frameworks/CoreGraphics/CGBitmapContext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

/**
@Status Stub
@Notes
*/
CGContextRef CGBitmapContextCreateWithData(void* data,
size_t width,
Expand All @@ -41,59 +40,27 @@ CGContextRef CGBitmapContextCreateWithData(void* data,
}

/**
@Status Stub
@Notes
@Status Interoperable
*/
/*
CGImageRef CGBitmapContextCreateImage(CGContextRef context) {
CGBitmapInfo CGBitmapContextGetBitmapInfo(CGContextRef context) {
UNIMPLEMENTED();
return StubReturn();
}*/

/**
@Status Interoperable
@Notes
*/
CGBitmapInfo CGBitmapContextGetBitmapInfo(CGContextRef context) {
int ret;

if (context) {
ret = context->Backing()->DestImage()->Backing()->BitmapInfo();
}
else {
TraceWarning(TAG, L"CGBitmapContextGetBitmapInfo: Null context!");
ret = 0;
}

return (CGBitmapInfo)ret;
}

/**
@Status Interoperable
@Notes
@Status Interoperable
*/
CGImageAlphaInfo CGBitmapContextGetAlphaInfo(CGContextRef context) {
int ret;

if (context) {
ret = context->Backing()->DestImage()->Backing()->BitmapInfo() & kCGBitmapAlphaInfoMask;
}
else {
TraceWarning(TAG, L"CGBitmapContextGetAlphaInfo: Null context!");
ret = 0;
}

return (CGImageAlphaInfo)ret;
UNIMPLEMENTED();
return StubReturn();
}

/**
@Status Interoperable
@Notes
*/
size_t CGBitmapContextGetBitsPerComponent(CGContextRef context) {
CGImageRef imageRef = context->Backing()->DestImage();
size_t bitsPerComponent = CGImageGetBitsPerComponent(imageRef);
return bitsPerComponent;
UNIMPLEMENTED();
return StubReturn();
}

/**
Expand All @@ -102,48 +69,6 @@ size_t CGBitmapContextGetBitsPerComponent(CGContextRef context) {
Expect returns of 24 bits on Islandwood where 32 bits is expected on iOS.
*/
size_t CGBitmapContextGetBitsPerPixel(CGContextRef context) {
CGImageRef imageRef = context->Backing()->DestImage();
const size_t bytesPerPixel = imageRef->Backing()->BytesPerPixel();
const size_t bitsPerByte = 8;
return bytesPerPixel * bitsPerByte;
}

/**
@Status Stub
@Notes
*/
/*
CGColorSpaceRef CGBitmapContextGetColorSpace(CGContextRef context) {
UNIMPLEMENTED();
return StubReturn();
}*/

/**
@Status Stub
@Notes
*/
/*
void * CGBitmapContextGetData(CGContextRef context) {
UNIMPLEMENTED();
return StubReturn();
}*/

/**
@Status Stub
@Notes
*/
/*
size_t CGBitmapContextGetHeight(CGContextRef context) {
UNIMPLEMENTED();
return StubReturn();
}*/

/**
@Status Stub
@Notes
*/
/*
size_t CGBitmapContextGetWidth(CGContextRef context) {
UNIMPLEMENTED();
return StubReturn();
}*/
}
4 changes: 0 additions & 4 deletions Frameworks/CoreGraphics/CGBitmapImage.mm
Original file line number Diff line number Diff line change
Expand Up @@ -348,10 +348,6 @@
_imgType = CGImageTypeBitmap;
}

CGContextImpl* CGBitmapImageBacking::CreateDrawingContext(CGContextRef base) {
return new CGContextCairo(base, _parent);
}

CGBitmapImageBacking::CGBitmapImageBacking(const __CGSurfaceInfo& surfaceInfo) {
_imageLocks = 0;
_cairoLocks = 0;
Expand Down
Loading