| OLD | NEW |
| (Empty) |
| 1 // Copyright 2013 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 MOJO_PUBLIC_BINDINGS_GLES2_CLIENT_GLES2_CLIENT_IMPL_H_ | |
| 6 #define MOJO_PUBLIC_BINDINGS_GLES2_CLIENT_GLES2_CLIENT_IMPL_H_ | |
| 7 | |
| 8 #include "mojo/public/bindings/lib/remote_ptr.h" | |
| 9 #include "mojom/gles2.h" | |
| 10 | |
| 11 namespace mojo { | |
| 12 class GLES2ClientImpl; | |
| 13 | |
| 14 class GLES2Delegate { | |
| 15 public: | |
| 16 virtual ~GLES2Delegate(); | |
| 17 virtual void DidCreateContext( | |
| 18 GLES2ClientImpl* gl, uint32_t width, uint32_t height); | |
| 19 virtual void ContextLost(GLES2ClientImpl* gl); | |
| 20 }; | |
| 21 | |
| 22 class GLES2ClientImpl : public GLES2ClientStub { | |
| 23 public: | |
| 24 explicit GLES2ClientImpl(GLES2Delegate* delegate, | |
| 25 ScopedMessagePipeHandle gl); | |
| 26 virtual ~GLES2ClientImpl(); | |
| 27 | |
| 28 static void Initialize(); | |
| 29 static void Terminate(); | |
| 30 | |
| 31 void SwapBuffers(); | |
| 32 | |
| 33 private: | |
| 34 virtual void DidCreateContext( | |
| 35 uint64_t encoded, uint32_t width, uint32_t height) MOJO_OVERRIDE; | |
| 36 virtual void ContextLost() MOJO_OVERRIDE; | |
| 37 | |
| 38 GLES2Delegate* delegate_; | |
| 39 RemotePtr<GLES2> gl_; | |
| 40 }; | |
| 41 | |
| 42 } // mojo | |
| 43 | |
| 44 #endif // MOJO_PUBLIC_BINDINGS_GLES2_CLIENT_GLES2_CLIENT_IMPL_H_ | |
| OLD | NEW |