• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CALayer composition changes with frame position
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer composition changes with frame position


  • Subject: Re: CALayer composition changes with frame position
  • From: "T.J. Usiyan" <email@hidden>
  • Date: Thu, 22 Mar 2012 10:15:40 -0400

How is the red rectangle drawn? I don't have any great insight right now
other than the fact that the change you are talking about happens at a
specific place. When the top aligns with the red rectangle. You might
consider color space or something like that. Maybe (and I am most certainly
guessing right now. pure conjecture) the problem has to do with mixing with
the grey?

On Thu, Mar 22, 2012 at 6:59 AM, Markus Spoettl <email@hidden>wrote:

> Hello all,
>
>  I have a super-strange issue that I have debugged for hours without any
> progress. I'm at a complete loss to explain what is going on and would
> appreciate ideas on getting to the bottom of this.
>
> I have a custom layer-hosting view with a delegate-drawn hierarchy, there
> are no filters involved. The hierarchy is like this:
>
> rootLayer
>  |-- moveableLayer
>        |-- stationaryLayer
>
> I can click-drag "movableLayer" around using the mouse. moveableLayer's
> opacity is 0.5, stationaryLayer's is 1.0.
>
> My problem is that stationaryLayer is composited differently, sometimes
> opaque, sometimes semi-transparent and I cannot explain why. It's
> completely reproducible and happens 100% of the time, even after rebooting.
>
> During the mouse-drag, I'm only changing moveableLayer's position
> property, wrapped in a CATransaction with +setDisableActions:YES). The
> opacity properties of neither layer are changed after creating them.
>
> To make sure no code accidentally changes opacity, I've added an observer
> to the opacity property of all layers involved, so I'm sure. I've also
> checked the observation works.
>
> Here's a short video that illustrates the issue:
>
> http://www.shiftoption.com/**temp/magic-layer-transparency.**mov<http://www.shiftoption.com/temp/magic-layer-transparency.mov>
>
> rootLayer drawn gray with a red rectangle in the middle, moveableLayer
> consists of the transparent white rectangle and a green-to-blue gradient.
> stationaryLayer is drawn with a yellow-to-red gradient. As you can see, at
> a certain point during the drag stationary switches from being composited
> transparently to completely opaque (relative to moveableLayer).
>
> All colors used have an alpha of 1.0. Also, the layers are never re-drawn
> during the drag, so it's not a painting issue.
>
> The problem goes away when setting moveableLayer's opacity to 1.0. Then
> stationaryLayer is composited the same, independent of moveableLayer's
> position.
>
> I'm on Lion 10.7.3 using the 10.7 SDK with Xcode 4.3.1.
>
> Any ideas greatly appreciated!
>
> Thanks
> Markus
> --
> ______________________________**____________
> Markus Spoettl
> ______________________________**_________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.**apple.com<http://lists.apple.com>
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/**mailman/options/cocoa-dev/**
>
> This email sent to email@hidden
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CALayer composition changes with frame position
      • From: Markus Spoettl <email@hidden>
References: 
 >CALayer composition changes with frame position (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Re: makeObjectsPerformSelector on a sub class
  • Next by Date: Re: advice for creating these controls
  • Previous by thread: Re: CALayer composition changes with frame position
  • Next by thread: Re: CALayer composition changes with frame position
  • Index(es):
    • Date
    • Thread