# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1301963731 0 # Node ID fe7a8dc9392cfa0bd0dcc27ca0beacac27254200 # Parent 13debcad9757d14803c09ce6c7df5fbea4ccf48b Dynamically set the video memory backing location, only if there is a render control. So we don't waste video memory on windows that won't get benefit from it. diff -r 13debcad9757 -r fe7a8dc9392c mac/dw.m --- a/mac/dw.m Mon Apr 04 22:40:42 2011 +0000 +++ b/mac/dw.m Tue Apr 05 00:35:31 2011 +0000 @@ -2199,6 +2199,12 @@ DWRender *render = (DWRender *)handle; NSSize oldsize = [render size]; NSSize newsize = [render frame].size; + NSWindow *window = [render window]; + + if([window preferredBackingLocation] != NSWindowBackingLocationVideoMemory) + { + [window setPreferredBackingLocation:NSWindowBackingLocationVideoMemory]; + } /* Eliminate duplicate configure requests */ if(oldsize.width != newsize.width || oldsize.height != newsize.height) @@ -6303,7 +6309,6 @@ backing:NSBackingStoreBuffered defer:false]; - [window setPreferredBackingLocation:NSWindowBackingLocationVideoMemory]; [window setTitle:[ NSString stringWithUTF8String:title ]]; DWView *view = [[DWView alloc] init];