| 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 "examples/ganesh_app/texture_uploader.h" | 5 #include "examples/ganesh_app/texture_uploader.h" |
| 6 | 6 |
| 7 #ifndef GL_GLEXT_PROTOTYPES | 7 #ifndef GL_GLEXT_PROTOTYPES |
| 8 #define GL_GLEXT_PROTOTYPES | 8 #define GL_GLEXT_PROTOTYPES |
| 9 #endif | 9 #endif |
| 10 | 10 |
| 11 #include <GLES2/gl2.h> | 11 #include <GLES2/gl2.h> |
| 12 #include <GLES2/gl2extmojo.h> | 12 #include <GLES2/gl2extmojo.h> |
| 13 | 13 |
| 14 #include "base/bind.h" | 14 #include "base/bind.h" |
| 15 #include "base/trace_event/trace_event.h" | 15 #include "base/trace_event/trace_event.h" |
| 16 #include "mojo/public/cpp/application/connect.h" | 16 #include "mojo/public/cpp/application/connect.h" |
| 17 #include "mojo/public/interfaces/application/shell.mojom.h" | 17 #include "mojo/public/interfaces/application/shell.mojom.h" |
| 18 #include "mojo/services/geometry/public/cpp/geometry_util.h" | 18 #include "mojo/services/geometry/cpp/geometry_util.h" |
| 19 #include "mojo/services/surfaces/public/cpp/surfaces_utils.h" | 19 #include "mojo/services/surfaces/public/cpp/surfaces_utils.h" |
| 20 | 20 |
| 21 namespace examples { | 21 namespace examples { |
| 22 | 22 |
| 23 TextureUploader::Client::~Client() {} | 23 TextureUploader::Client::~Client() {} |
| 24 | 24 |
| 25 TextureUploader::TextureUploader(Client* client, | 25 TextureUploader::TextureUploader(Client* client, |
| 26 mojo::Shell* shell, | 26 mojo::Shell* shell, |
| 27 base::WeakPtr<mojo::GLContext> context) | 27 base::WeakPtr<mojo::GLContext> context) |
| 28 : client_(client), | 28 : client_(client), |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 client_->OnSurfaceIdAvailable(qualified_id.Pass()); | 163 client_->OnSurfaceIdAvailable(qualified_id.Pass()); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void TextureUploader::SetIdNamespace(uint32_t id_namespace) { | 166 void TextureUploader::SetIdNamespace(uint32_t id_namespace) { |
| 167 id_namespace_ = id_namespace; | 167 id_namespace_ = id_namespace; |
| 168 if (local_id_ != 0u) | 168 if (local_id_ != 0u) |
| 169 SendFullyQualifiedID(); | 169 SendFullyQualifiedID(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace examples | 172 } // namespace examples |
| OLD | NEW |