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 10 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

12 changes: 12 additions & 0 deletions Frameworks/CoreGraphics/CGBitmapContext.mm
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ CGImageRef CGBitmapContextCreateImage(CGContextRef context) {
@Notes
*/
CGBitmapInfo CGBitmapContextGetBitmapInfo(CGContextRef context) {
#if 0

@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.

Why the #if 0s? If this is because of he refactor Jeyaraj (@msft-Jeyaram) is doing, we might as well remove this code and add it back as needed. Presumably, we will still not do the context->Backing()->DestImage()->Backing()->Dosomething() anymore. #Resolved

int ret;

if (context) {
Expand All @@ -66,13 +67,16 @@ CGBitmapInfo CGBitmapContextGetBitmapInfo(CGContextRef context) {
}

return (CGBitmapInfo)ret;
#endif
return 0;
}

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

if (context) {
Expand All @@ -84,16 +88,21 @@ CGImageAlphaInfo CGBitmapContextGetAlphaInfo(CGContextRef context) {
}

return (CGImageAlphaInfo)ret;
#endif
return (CGImageAlphaInfo)0;
}

/**
@Status Interoperable
@Notes
*/
size_t CGBitmapContextGetBitsPerComponent(CGContextRef context) {
#if 0
CGImageRef imageRef = context->Backing()->DestImage();

@MSFTFox Henry Fox (MSFTFox) Oct 11, 2016 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: I don't think we'll miss anything but since these are technically being converted to stubs should we be changing the @status on these to stubs for proper tracking? #WontFix

@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.

I attempted to cover that here. :) #WontFix

size_t bitsPerComponent = CGImageGetBitsPerComponent(imageRef);
return bitsPerComponent;
#endif
return 0;
}

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

/**
Expand Down
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