Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Retired
kizkasen
Posts: 54
Registered: ‎06-26-2012
My Device: BlackBerry Bold 9900
Accepted Solution

Changing SCREEN_PROPERTY_USAGE and/or SCREEN_PROPERTY_BUFFER_SIZE on window?

Does changing SCREEN_PROPERTY_USAGE and/or SCREEN_PROPERTY_BUFFER_SIZE require buffers to be destroyed and recreated?

Please use plain text.
Retired
kizkasen
Posts: 54
Registered: ‎06-26-2012
My Device: BlackBerry Bold 9900

Re: Changing SCREEN_PROPERTY_USAGE and/or SCREEN_PROPERTY_BUFFER_SIZE on window?

From EB, Technical Lead for Graphics:

 

Changing the buffer size usually means new buffers, but the old ones don't have to be destroyed. Otherwise, you would get a flash on the screen (no buffers means the window can't be visible). After changing the usage or size you simply have to query the render buffers and you will get new handles. The old buffers are kept until you post content on one of the new buffers. Afterwards the old buffers are reaped automatically. You don't have to destroy them explicitly. 

 

The cases where changing the usage doesn't require new buffers:

* new usage has fewer bits than old usage 

* new usage only has read/write as extra bits

 

The cases where changing the buffer size doesn't require new buffers:

* new width is old height and new height is old width and usage had rotation bit set

 

 

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Changing SCREEN_PROPERTY_USAGE and/or SCREEN_PROPERTY_BUFFER_SIZE on window?

I am a bit confused - have you answered your own question? How come EB tells RIM how to use API?

Please use plain text.
Retired
kizkasen
Posts: 54
Registered: ‎06-26-2012
My Device: BlackBerry Bold 9900

Re: Changing SCREEN_PROPERTY_USAGE and/or SCREEN_PROPERTY_BUFFER_SIZE on window?

Please be assured that this reply is from RIM, EB being our Technical Lead for Graphics here at RIM. I have just copied an exchange between him and me here instead of summarizing it for you; very sorry for that and the confusion this has caused.

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Changing SCREEN_PROPERTY_USAGE and/or SCREEN_PROPERTY_BUFFER_SIZE on window?

Oh, then great! Thank you very much! -)

Please use plain text.
Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.634 Dev OS, Z30 (STA100-5)-10.3.1.634 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: Changing SCREEN_PROPERTY_USAGE and/or SCREEN_PROPERTY_BUFFER_SIZE on window?

Sweet. Thanks for answering my tweet. That's interesting. There wasn't anything that indicated that I would ever have to rebuild the buffers. So everything is handled under the hood?
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Developer
rcmaniac25
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.634 Dev OS, Z30 (STA100-5)-10.3.1.634 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: Changing SCREEN_PROPERTY_USAGE and/or SCREEN_PROPERTY_BUFFER_SIZE on window?

An additional question on this, I mentioned usage and buffer size. What about SCREEN_PROPERTY_FORMAT? Is that covered under the same "after changing the property, it will be applied when the buffers are retrieved"?
---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Please use plain text.
Retired
kizkasen
Posts: 54
Registered: ‎06-26-2012
My Device: BlackBerry Bold 9900

Re: Changing SCREEN_PROPERTY_USAGE and/or SCREEN_PROPERTY_BUFFER_SIZE on window?

Yes, SCREEN_PROPERTY_FORMAT is also covered under the same "after changing the property, it will be applied when the buffers are retrieved".

Please use plain text.