• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef REMOTING_IOS_UI_DESKTOP_TEXTURE_H_
6 #define REMOTING_IOS_UI_DESKTOP_TEXTURE_H_
7 
8 #import <Foundation/Foundation.h>
9 #import <GLKit/GLKit.h>
10 
11 #import "remoting/ios/utility.h"
12 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
13 
14 @interface DesktopTexture : NSObject {
15  @private
16   // GL name
17   GLuint _textureId;
18   webrtc::DesktopSize _textureSize;
19   BOOL _needInitialize;
20 }
21 
22 - (const webrtc::DesktopSize&)textureSize;
23 
24 - (void)setTextureSize:(const webrtc::DesktopSize&)size;
25 
26 // bind this object to an effect's via the effects properties
27 - (void)bindToEffect:(GLKEffectPropertyTexture*)effectProperty;
28 
29 - (BOOL)needDraw;
30 
31 // draw a region of the texture
32 - (void)drawRegion:(GLRegion*)region rect:(CGRect)rect;
33 
34 - (void)releaseTexture;
35 
36 @end
37 
38 #endif  // REMOTING_IOS_UI_DESKTOP_TEXTURE_H_