Review request for 7131793: [macosx] some cleanup in OGL pipeline code
Mike Swingler
swingler at apple.com
Mon Jan 30 09:18:42 PST 2012
On Jan 30, 2012, at 5:59 AM, Dmitry Cherepanov wrote:
> Mike Swingler wrote:
>
>> On Jan 27, 2012, at 7:17 AM, Dmitry Cherepanov wrote:
>>
>>> Hello,
>>>
>>> Here's some changes to remove some stale code from the OGL pipeline. This code has been introduced as a part of the initial implementation for CALayer-based rendering and disabled by the changes for MACOSX_PORT-766.
>>>
>>> http://cr.openjdk.java.net/~dcherepanov/7131793/webrev.1/ <http://cr.openjdk.java.net/%7Edcherepanov/7131793/webrev.1/>
>>
>> One tiny detail: I'd recommend using -jObjectWithEnv: instead of -jObject here (because it's a little faster to not re-fetch the env):
>> + JNFCallVoidMethod(env, [self.javaLayer jObject], jm_drawInCGLContext);
>
> On second thought, seems like -jObject simply returns the global reference that the wrapper holds without obtaining the env. What's the reason for re-fetching the env?
That is correct...we are returning the global env, I had forgot about that. It doesn't seem safe though, if the wrapper gets dealloc'd while the ref is still held in a local. :-/
As is though, I don't think we can change the API at this point.
Sorry for the noise,
Mike Swingler
Apple Inc.
More information about the macosx-port-dev
mailing list