Skip to content

Commit

Permalink
OSX launcher now uses CSS 3D rendering by default, setWantsLayer for …
Browse files Browse the repository at this point in the history
…UIViews (including WebView) needs further experimentation (my library of FXL test EPUBs renders best overall with CSS3D...with the caveat that video/audio do not always interact, text not selectable, etc.) TODO continued...
  • Loading branch information
danielweck committed Oct 21, 2014
1 parent d3f78e4 commit 71fb04c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions LauncherOSX/LOXPreferences.mm
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ -(id)initWithDictionary:(NSDictionary *)dict
-(NSDictionary *) toDictionary
{
return @{
@"enableGPUHardwareAccelerationCSS3D": [NSNumber numberWithBool:YES],

NSStringFromSelector(@selector(fontSize)): self.fontSize,
NSStringFromSelector(@selector(mediaOverlaysSkipSkippables)): self.mediaOverlaysSkipSkippables,
NSStringFromSelector(@selector(mediaOverlaysEscapeEscapables)): self.mediaOverlaysEscapeEscapables,
Expand Down
7 changes: 5 additions & 2 deletions LauncherOSX/LOXWebViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,11 @@ - (void)awakeFromNib

NSURL *url = [NSURL fileURLWithPath:_baseUrlPath];

[[_webView superview] setWantsLayer:YES];
[_webView setWantsLayer:NO];
// See enableGPUHardwareAccelerationCSS3D in LOXPreferences@toDictionary()
//[[_webView superview] setWantsLayer:YES];
//[_webView setWantsLayer:YES];
//[[[_webView mainFrame] frameView] setWantsLayer:YES];
//[[[[_webView mainFrame] frameView] documentView] setWantsLayer:YES];

[[_webView mainFrame] loadRequest:[NSURLRequest requestWithURL:url]];
}
Expand Down
2 changes: 1 addition & 1 deletion readium-shared-js

0 comments on commit 71fb04c

Please sign in to comment.