yangsu@google.com | 688823f | 2011-08-30 19:14:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2011 Google Inc. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license that can be |
| 5 | * found in the LICENSE file. |
| 6 | */ |
| 7 | |
| 8 | #include "SampleApp.h" |
| 9 | #import "SkUIView.h" |
| 10 | |
| 11 | class SkiOSDeviceManager; |
| 12 | class SkOSWindow; |
| 13 | class SkEvent; |
| 14 | struct FPSState; |
| 15 | |
| 16 | @interface SkSampleUIView : SkUIView { |
| 17 | BOOL fRedrawRequestPending; |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 18 | |
yangsu@google.com | 688823f | 2011-08-30 19:14:13 +0000 | [diff] [blame] | 19 | struct { |
| 20 | EAGLContext* fContext; |
| 21 | GLuint fRenderbuffer; |
| 22 | GLuint fStencilbuffer; |
| 23 | GLuint fFramebuffer; |
| 24 | GLint fWidth; |
| 25 | GLint fHeight; |
| 26 | } fGL; |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 27 | |
yangsu@google.com | 688823f | 2011-08-30 19:14:13 +0000 | [diff] [blame] | 28 | NSString* fTitle; |
| 29 | CALayer* fRasterLayer; |
| 30 | CAEAGLLayer* fGLLayer; |
rmistry@google.com | d6176b0 | 2012-08-23 18:14:13 +0000 | [diff] [blame] | 31 | |
yangsu@google.com | 688823f | 2011-08-30 19:14:13 +0000 | [diff] [blame] | 32 | FPSState* fFPSState; |
| 33 | SkiOSDeviceManager* fDevManager; |
| 34 | } |
| 35 | |
| 36 | @property (nonatomic, copy) NSString* fTitle; |
| 37 | @property (nonatomic, retain) CALayer* fRasterLayer; |
| 38 | @property (nonatomic, retain) CAEAGLLayer* fGLLayer; |
| 39 | |
| 40 | - (id)initWithDefaults; |
| 41 | - (void)drawInRaster; |
| 42 | - (void)forceRedraw; |
| 43 | |
| 44 | - (void)setSkTitle:(const char*)title; |
| 45 | - (void)postInvalWithRect:(const SkIRect*)rectOrNil; |
bsalomon@google.com | 64cc810 | 2013-03-05 20:06:05 +0000 | [diff] [blame] | 46 | - (void)getAttachmentInfo:(SkOSWindow::AttachmentInfo*)info; |
| 47 | |
rmistry@google.com | bda03db | 2012-08-14 20:27:54 +0000 | [diff] [blame] | 48 | @end |