blob: a1009b84da2ad14cd4094d4c8411e2564f273b11 [file] [log] [blame]
yangsu@google.com688823f2011-08-30 19:14:13 +00001/*
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
11class SkiOSDeviceManager;
12class SkOSWindow;
13class SkEvent;
14struct FPSState;
15
16@interface SkSampleUIView : SkUIView {
17 BOOL fRedrawRequestPending;
rmistry@google.comd6176b02012-08-23 18:14:13 +000018
yangsu@google.com688823f2011-08-30 19:14:13 +000019 struct {
20 EAGLContext* fContext;
21 GLuint fRenderbuffer;
22 GLuint fStencilbuffer;
23 GLuint fFramebuffer;
24 GLint fWidth;
25 GLint fHeight;
26 } fGL;
rmistry@google.comd6176b02012-08-23 18:14:13 +000027
yangsu@google.com688823f2011-08-30 19:14:13 +000028 NSString* fTitle;
29 CALayer* fRasterLayer;
30 CAEAGLLayer* fGLLayer;
rmistry@google.comd6176b02012-08-23 18:14:13 +000031
yangsu@google.com688823f2011-08-30 19:14:13 +000032 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.com64cc8102013-03-05 20:06:05 +000046- (void)getAttachmentInfo:(SkOSWindow::AttachmentInfo*)info;
47
rmistry@google.combda03db2012-08-14 20:27:54 +000048@end