Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CopyBits and dual monitor configration



On Jul 29, 2004, at 5:21 PM, OL&L Lists wrote:

> I don't think that's true. Any call that modifies the port's bits
> directly should always be bracketed by lock/unlock calls:
>
> http://developer.apple.com/documentation/Carbon/Reference/
> QuickDraw_Ref/qdref_main/function_group_3.html#//apple_ref/c/func/
> LockPortBits
>
> "If you're writing code that reads or modifies the port bits
> directly, you should bracket your code with calls to this function
> and UnlockPortBits."

"Modifying the port bits directly" means assigning to them without
using QuickDraw, i.e. via a custom blitter. Any QuickDraw call will do
the right thing without an explicit need to lock and unlock.

You may see a performance benefit if you manually lock, since QuickDraw
will lock and unlock between every single operation (it doesn't know
how many things you plan on doing with the port). But unless you are
by-hand overwriting pixels, you do not need to concern yourself with
this.

> From experience it sounds to me more like you have a SetPort problem.

I agree; IMO the OP's problem is probably caused by not setting the
port properly before the CopyBits...
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.