Skip to content

Commit

Permalink
Per shiproom discussion, reverting "UI Image fixes (#636)" until we h…
Browse files Browse the repository at this point in the history
…ave the fixes for High-DPI issues ready to merge.

This reverts commit a106d3d.
  • Loading branch information
Raj Seshasankaran committed Aug 2, 2016
1 parent d6c3e1f commit f34a09a
Show file tree
Hide file tree
Showing 5 changed files with 354 additions and 140 deletions.
5 changes: 4 additions & 1 deletion Frameworks/CoreGraphics/CGContext.mm
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//******************************************************************************
//
// Copyright (c) 2016 Intel Corporation. All rights reserved.
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
Expand Down Expand Up @@ -72,6 +71,10 @@ - (void)dealloc {
delete _backing;
}

CGContextImpl* __CGContext::Backing() {
return _backing;
}

/**
@Status Interoperable
*/
Expand Down
9 changes: 4 additions & 5 deletions Frameworks/CoreGraphics/CGContextCairo.mm
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//******************************************************************************
//
// Copyright (c) 2016 Intel Corporation. All rights reserved.
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
Expand Down Expand Up @@ -326,7 +325,7 @@
cairo_new_path(_drawContext);
cairo_rectangle(_drawContext, 0, 0, dest.size.width, dest.size.height);
cairo_clip(_drawContext);
cairo_paint_with_alpha(_drawContext, curState->curFillColor.a);
cairo_paint(_drawContext);

cairo_restore(_drawContext);
cairo_new_path(_drawContext);
Expand Down Expand Up @@ -376,7 +375,7 @@
cairo_clip(_drawContext);

if (curState->_imgMask == NULL) {
cairo_paint_with_alpha(_drawContext, curState->curFillColor.a);
cairo_paint(_drawContext);
} else {
cairo_mask_surface(_drawContext, curState->_imgMask->Backing()->LockCairoSurface(), 0.0, 0.0);
curState->_imgMask->Backing()->ReleaseCairoSurface();
Expand Down Expand Up @@ -1431,7 +1430,7 @@
cairo_mask_surface(_drawContext, curState->_imgMask->Backing()->LockCairoSurface(), 0.0, 0.0);
curState->_imgMask->Backing()->ReleaseCairoSurface();
} else {
cairo_paint_with_alpha(_drawContext, curState->curFillColor.a);
cairo_paint(_drawContext);
}
cairo_pattern_destroy(pattern);
UNLOCK_CAIRO();
Expand Down Expand Up @@ -1472,7 +1471,7 @@
cairo_mask_surface(_drawContext, curState->_imgMask->Backing()->LockCairoSurface(), 0.0, 0.0);
curState->_imgMask->Backing()->ReleaseCairoSurface();
} else {
cairo_paint_with_alpha(_drawContext, curState->curFillColor.a);
cairo_paint(_drawContext);
}
cairo_pattern_destroy(pattern);
UNLOCK_CAIRO();
Expand Down
Loading

0 comments on commit f34a09a

Please sign in to comment.