Skip to content

Commit

Permalink
Revert "UI Image fixes (#636)"
Browse files Browse the repository at this point in the history
This reverts commit a106d3d.
  • Loading branch information
Ramu-msft committed Jul 27, 2016
1 parent 2f1e497 commit 68c7e96
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 @@ -71,6 +70,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 @@ -325,7 +324,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 @@ -375,7 +374,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 @@ -1428,7 +1427,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 @@ -1469,7 +1468,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 68c7e96

Please sign in to comment.