-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8343398: Add reducedData preference #1656
Open
mstr2
wants to merge
17
commits into
openjdk:master
Choose a base branch
from
mstr2:feature/reduced-data
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
b473f3e
Implementation of reducedData
mstr2 9d22732
add linux implementation
mstr2 fe22bd5
add macOS implementation
mstr2 0245c2e
error message tweak
mstr2 5c2e255
javadoc change
mstr2 8b8b1bd
refactor macOS PlatformSupport
mstr2 455613f
Merge branch 'master' into feature/reduced-data
mstr2 4bfcb33
changed formatting
mstr2 cbd3cb6
formatting
mstr2 43254d3
store the app delegate reference in MacApplication
mstr2 fd4846a
typo
mstr2 a590b31
smaller diff
mstr2 7feba0b
method name
mstr2 f838492
only update preferences that may have changed
mstr2 b7840bd
change enum constant names
mstr2 6f015a4
release macOS PlatformSupport instance
mstr2 b163571
Merge branch 'master' into feature/reduced-data
mstr2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -952,30 +952,47 @@ + (BOOL)syncRenderingDisabled { | |
|
||
/* | ||
* Class: com_sun_glass_ui_mac_MacApplication | ||
* Method: _runLoop | ||
* Signature: (Ljava/lang/ClassLoader;Ljava/lang/Runnable;Z)V | ||
* Method: _initDelegate | ||
* Signature: (Ljava/lang/ClassLoader;Ljava/lang/Runnable;Z)J | ||
*/ | ||
JNIEXPORT void JNICALL Java_com_sun_glass_ui_mac_MacApplication__1runLoop | ||
JNIEXPORT jlong JNICALL Java_com_sun_glass_ui_mac_MacApplication__1initDelegate | ||
(JNIEnv *env, jobject japplication, jobject classLoader, | ||
jobject jlaunchable, jboolean isTaskbarApplication) | ||
{ | ||
LOG("Java_com_sun_glass_ui_mac_MacApplication__1runLoop"); | ||
LOG("Java_com_sun_glass_ui_mac_MacApplication__1initDelegate"); | ||
|
||
NSAutoreleasePool *glasspool = [[NSAutoreleasePool alloc] init]; | ||
if ([NSThread isMainThread] == YES) | ||
{ | ||
if ([NSThread isMainThread] == YES) | ||
{ | ||
// fprintf(stderr, "\nWARNING: Glass was started on 1st thread and will block this thread.\nYou most likely do not want to do this - please remove \"-XstartOnFirstThread\" from VM arguments.\n\n"); | ||
} | ||
else | ||
// fprintf(stderr, "\nWARNING: Glass was started on 1st thread and will block this thread.\nYou most likely do not want to do this - please remove \"-XstartOnFirstThread\" from VM arguments.\n\n"); | ||
} | ||
else | ||
{ | ||
if ([[NSThread currentThread] name] == nil) | ||
{ | ||
if ([[NSThread currentThread] name] == nil) | ||
{ | ||
[[NSThread currentThread] setName:@"Main Java Thread"]; | ||
} | ||
[[NSThread currentThread] setName:@"Main Java Thread"]; | ||
} | ||
} | ||
|
||
return (jlong)[[GlassApplication alloc] initWithEnv:env | ||
application:japplication | ||
launchable:jlaunchable | ||
taskbarApplication:isTaskbarApplication | ||
classLoader:classLoader]; | ||
} | ||
|
||
GlassApplication *glass = [[GlassApplication alloc] initWithEnv:env application:japplication launchable:jlaunchable taskbarApplication:isTaskbarApplication classLoader:classLoader]; | ||
/* | ||
* Class: com_sun_glass_ui_mac_MacApplication | ||
* Method: _runLoop | ||
* Signature: (J)V | ||
*/ | ||
JNIEXPORT void JNICALL Java_com_sun_glass_ui_mac_MacApplication__1runLoop | ||
(JNIEnv *env, jobject japplication, jlong appDelegate) | ||
{ | ||
LOG("Java_com_sun_glass_ui_mac_MacApplication__1runLoop"); | ||
|
||
NSAutoreleasePool *glasspool = [[NSAutoreleasePool alloc] init]; | ||
{ | ||
GlassApplication* glass = (GlassApplication*)appDelegate; | ||
if ([NSThread isMainThread] == YES) { | ||
[glass runLoop: glass]; | ||
} else { | ||
|
@@ -998,13 +1015,17 @@ + (BOOL)syncRenderingDisabled { | |
/* | ||
* Class: com_sun_glass_ui_mac_MacApplication | ||
* Method: _finishTerminating | ||
* Signature: ()V | ||
* Signature: (J)V | ||
*/ | ||
JNIEXPORT void JNICALL Java_com_sun_glass_ui_mac_MacApplication__1finishTerminating | ||
(JNIEnv *env, jobject japplication) | ||
(JNIEnv *env, jobject japplication, jlong appDelegate) | ||
{ | ||
LOG("Java_com_sun_glass_ui_mac_MacApplication__1finishTerminating"); | ||
|
||
if (appDelegate) { | ||
[(GlassApplication*)appDelegate release]; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is needed because you moved the allocation of GlassApplication outside (before) the auto-release pool in runLoop, so looks good. |
||
} | ||
|
||
if (isEmbedded) { | ||
return; | ||
} | ||
|
@@ -1262,11 +1283,12 @@ + (BOOL)syncRenderingDisabled { | |
/* | ||
* Class: com_sun_glass_ui_mac_MacApplication | ||
* Method: getPlatformPreferences | ||
* Signature: ()Ljava/util/Map; | ||
* Signature: (J)Ljava/util/Map; | ||
*/ | ||
JNIEXPORT jobject JNICALL Java_com_sun_glass_ui_mac_MacApplication_getPlatformPreferences | ||
(JNIEnv *env, jobject self) | ||
JNIEXPORT jobject JNICALL Java_com_sun_glass_ui_mac_MacApplication__1getPlatformPreferences | ||
(JNIEnv *env, jobject self, jlong appDelegate) | ||
{ | ||
GlassApplication* app = (GlassApplication*)[NSApp delegate]; | ||
return [app getPlatformPreferences]; | ||
return appDelegate | ||
? [(GlassApplication*)appDelegate getPlatformPreferences] | ||
: nil; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a clean split to me.