Revision: 2559
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2559&view=rev
Author:   hofman
Date:     2007-07-25 17:10:39 -0700 (Wed, 25 Jul 2007)

Log Message:
-----------
Don't keep the bitmap imagerep, as CIImage does not copy the bitmap, but 
apparently keeps a reference to the bitmap rep.  

Modified Paths:
--------------
    trunk/SKTransitionController.h
    trunk/SKTransitionController.m

Modified: trunk/SKTransitionController.h
===================================================================
--- trunk/SKTransitionController.h      2007-07-25 21:58:39 UTC (rev 2558)
+++ trunk/SKTransitionController.h      2007-07-26 00:10:39 UTC (rev 2559)
@@ -118,7 +118,6 @@
     NSWindow *transitionWindow;
     SKTransitionView *transitionView;
     NSView *view;
-    NSBitmapImageRep *bitmap;
     CIImage *initialImage;
     NSRect imageRect;
     

Modified: trunk/SKTransitionController.m
===================================================================
--- trunk/SKTransitionController.m      2007-07-25 21:58:39 UTC (rev 2558)
+++ trunk/SKTransitionController.m      2007-07-26 00:10:39 UTC (rev 2559)
@@ -113,7 +113,6 @@
 
 - (void)dealloc {
     [transitionWindow release];
-    [bitmap release];
     [initialImage release];
     [super dealloc];
 }
@@ -125,8 +124,6 @@
 - (void)setView:(NSView *)newView {
     if (view != newView) {
         view = newView;
-        [bitmap release];
-        bitmap = nil;
     }
 }
 
@@ -255,16 +252,12 @@
 
 - (CIImage *)createCurrentImage {
     NSRect bounds = [view bounds];
+    NSBitmapImageRep *contentBitmap = [view 
bitmapImageRepForCachingDisplayInRect:bounds];
     
-    if (bitmap == nil || NSEqualSizes(bounds.size, NSMakeSize([bitmap 
pixelsWide], [bitmap pixelsHigh])) == NO) {
-        [bitmap release];
-        bitmap = [[view bitmapImageRepForCachingDisplayInRect:bounds] retain];
-    }
+    [contentBitmap clear];
+    [view cacheDisplayInRect:bounds toBitmapImageRep:contentBitmap];
     
-    [bitmap clear];
-    [view cacheDisplayInRect:bounds toBitmapImageRep:bitmap];
-    
-    return [[CIImage alloc] initWithBitmapImageRep:bitmap];
+    return [[CIImage alloc] initWithBitmapImageRep:contentBitmap];
 }
 
 - (NSWindow *)transitionWindow {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to