OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/gpu/texture_uploader.h" | 5 #include "mojo/gpu/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 "mojo/services/geometry/public/cpp/geometry_util.h" | 14 #include "mojo/services/geometry/cpp/geometry_util.h" |
15 #include "mojo/services/surfaces/public/cpp/surfaces_utils.h" | 15 #include "mojo/services/surfaces/public/cpp/surfaces_utils.h" |
16 | 16 |
17 namespace mojo { | 17 namespace mojo { |
18 | 18 |
19 mojo::FramePtr TextureUploader::GetUploadFrame( | 19 mojo::FramePtr TextureUploader::GetUploadFrame( |
20 base::WeakPtr<mojo::GLContext> context, | 20 base::WeakPtr<mojo::GLContext> context, |
21 uint32_t resource_id, | 21 uint32_t resource_id, |
22 const scoped_ptr<mojo::GLTexture>& texture) { | 22 const scoped_ptr<mojo::GLTexture>& texture) { |
23 if (!context) { | 23 if (!context) { |
24 return mojo::FramePtr(); | 24 return mojo::FramePtr(); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 frame->resources.push_back(resource.Pass()); | 86 frame->resources.push_back(resource.Pass()); |
87 quad->texture_quad_state = texture_state.Pass(); | 87 quad->texture_quad_state = texture_state.Pass(); |
88 pass->quads.push_back(quad.Pass()); | 88 pass->quads.push_back(quad.Pass()); |
89 | 89 |
90 frame->passes.push_back(pass.Pass()); | 90 frame->passes.push_back(pass.Pass()); |
91 return frame.Pass(); | 91 return frame.Pass(); |
92 } | 92 } |
93 | 93 |
94 } // namespace mojo | 94 } // namespace mojo |
OLD | NEW |