| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/gles2/gles2_client_impl.h" | 5 #include "mojo/gles2/gles2_client_impl.h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
| 9 | 9 |
| 10 #include "mojo/public/gles2/gles2.h" | 10 #include "mojo/public/gles2/gles2.h" |
| 11 | 11 |
| 12 namespace mojo { | 12 namespace mojo { |
| 13 namespace gles2 { | 13 namespace gles2 { |
| 14 | 14 |
| 15 GLES2ClientImpl::GLES2ClientImpl(MojoAsyncWaiter* async_waiter, | 15 GLES2ClientImpl::GLES2ClientImpl(MojoAsyncWaiter* async_waiter, |
| 16 ScopedMessagePipeHandle pipe, | 16 ScopedMessagePipeHandle pipe, |
| 17 MojoGLES2ContextCreated created_callback, | 17 MojoGLES2ContextCreated created_callback, |
| 18 MojoGLES2ContextLost lost_callback, | 18 MojoGLES2ContextLost lost_callback, |
| 19 MojoGLES2DrawAnimationFrame animation_callback, | 19 MojoGLES2DrawAnimationFrame animation_callback, |
| 20 void* closure) | 20 void* closure) |
| 21 : service_(pipe.Pass(), this, async_waiter), | 21 : service_(pipe.Pass(), this, NULL, async_waiter), |
| 22 implementation_(NULL), | 22 implementation_(NULL), |
| 23 created_callback_(created_callback), | 23 created_callback_(created_callback), |
| 24 lost_callback_(lost_callback), | 24 lost_callback_(lost_callback), |
| 25 animation_callback_(animation_callback), | 25 animation_callback_(animation_callback), |
| 26 closure_(closure) { | 26 closure_(closure) { |
| 27 } | 27 } |
| 28 | 28 |
| 29 GLES2ClientImpl::~GLES2ClientImpl() { | 29 GLES2ClientImpl::~GLES2ClientImpl() { |
| 30 service_->Destroy(); | 30 service_->Destroy(); |
| 31 } | 31 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 52 void GLES2ClientImpl::ContextLost() { | 52 void GLES2ClientImpl::ContextLost() { |
| 53 lost_callback_(closure_); | 53 lost_callback_(closure_); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void GLES2ClientImpl::DrawAnimationFrame() { | 56 void GLES2ClientImpl::DrawAnimationFrame() { |
| 57 animation_callback_(closure_); | 57 animation_callback_(closure_); |
| 58 } | 58 } |
| 59 | 59 |
| 60 } // namespace examples | 60 } // namespace examples |
| 61 } // namespace mojo | 61 } // namespace mojo |
| OLD | NEW |