OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 created_context_ = false; | 89 created_context_ = false; |
90 } | 90 } |
91 | 91 |
92 if (was_resized_) { | 92 if (was_resized_) { |
93 obj_->Resize(width_, height_); | 93 obj_->Resize(width_, height_); |
94 was_resized_ = false; | 94 was_resized_ = false; |
95 } | 95 } |
96 | 96 |
97 | 97 |
98 if (obj_) { | 98 if (obj_) { |
99 obj_->client()->Tick(); | |
100 obj_->client()->RenderClient(true); | 99 obj_->client()->RenderClient(true); |
101 } | 100 } |
102 | 101 |
103 // Call super to finalize the drawing. By default it just calls glFlush(). | 102 // Call super to finalize the drawing. By default it just calls glFlush(). |
104 [super drawInCGLContext:ctx pixelFormat:pf forLayerTime:t displayTime:ts]; | 103 [super drawInCGLContext:ctx pixelFormat:pf forLayerTime:t displayTime:ts]; |
105 } | 104 } |
106 | 105 |
107 - (BOOL)canDrawInCGLContext:(CGLContextObj)ctx | 106 - (BOOL)canDrawInCGLContext:(CGLContextObj)ctx |
108 pixelFormat:(CGLPixelFormatObj)pf | 107 pixelFormat:(CGLPixelFormatObj)pf |
109 forLayerTime:(CFTimeInterval)t | 108 forLayerTime:(CFTimeInterval)t |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 return glContext_; | 187 return glContext_; |
189 } | 188 } |
190 | 189 |
191 - (void)setWidth:(int)width height:(int)height { | 190 - (void)setWidth:(int)width height:(int)height { |
192 width_ = width; | 191 width_ = width; |
193 height_ = height; | 192 height_ = height; |
194 was_resized_ = true; | 193 was_resized_ = true; |
195 } | 194 } |
196 | 195 |
197 @end | 196 @end |
OLD | NEW |