| 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/bitmap_uploader/bitmap_uploader.h" | 5 #include "examples/bitmap_uploader/bitmap_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 // GL_GLEXT_PROTOTYPES | 9 #endif // GL_GLEXT_PROTOTYPES |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "gpu/GLES2/gl2chromium.h" | 12 #include "gpu/GLES2/gl2chromium.h" |
| 13 #include "gpu/GLES2/gl2extchromium.h" | 13 #include "gpu/GLES2/gl2extchromium.h" |
| 14 #include "mojo/public/c/gles2/gles2.h" | 14 #include "mojo/public/c/gles2/gles2.h" |
| 15 #include "mojo/public/cpp/application/connect.h" | 15 #include "mojo/public/cpp/application/connect.h" |
| 16 #include "mojo/public/interfaces/application/shell.mojom.h" | 16 #include "mojo/public/interfaces/application/shell.mojom.h" |
| 17 #include "mojo/services/public/cpp/geometry/geometry_util.h" | 17 #include "mojo/services/public/cpp/geometry/geometry_util.h" |
| 18 #include "mojo/services/public/cpp/surfaces/surfaces_utils.h" | 18 #include "mojo/services/surfaces/public/cpp/surfaces_utils.h" |
| 19 #include "mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.h" | 19 #include "mojo/services/view_manager/public/cpp/lib/view_manager_client_impl.h" |
| 20 #include "third_party/khronos/GLES2/gl2.h" | 20 #include "third_party/khronos/GLES2/gl2.h" |
| 21 #include "ui/gfx/geometry/rect.h" | 21 #include "ui/gfx/geometry/rect.h" |
| 22 | 22 |
| 23 #define TRANSPARENT_COLOR 0x00000000 | 23 #define TRANSPARENT_COLOR 0x00000000 |
| 24 | 24 |
| 25 namespace mojo { | 25 namespace mojo { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 void LostContext(void*) { | 28 void LostContext(void*) { |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 0); | 266 0); |
| 267 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | 267 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
| 268 return texture; | 268 return texture; |
| 269 } | 269 } |
| 270 | 270 |
| 271 uint32_t BitmapUploader::TextureFormat() { | 271 uint32_t BitmapUploader::TextureFormat() { |
| 272 return format_ == BGRA ? GL_BGRA_EXT : GL_RGBA; | 272 return format_ == BGRA ? GL_BGRA_EXT : GL_RGBA; |
| 273 } | 273 } |
| 274 | 274 |
| 275 } // namespace mojo | 275 } // namespace mojo |
| OLD | NEW |