OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "content/gpu/gles2_texture_to_egl_image_translator.h" | 5 #include "content/common/gpu/gles2_texture_to_egl_image_translator.h" |
| 6 |
| 7 #include "base/logging.h" |
6 | 8 |
7 // Get EGL extension functions. | 9 // Get EGL extension functions. |
8 static PFNEGLCREATEIMAGEKHRPROC egl_create_image_khr = | 10 static PFNEGLCREATEIMAGEKHRPROC egl_create_image_khr = |
9 reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>( | 11 reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>( |
10 eglGetProcAddress("eglCreateImageKHR")); | 12 eglGetProcAddress("eglCreateImageKHR")); |
11 static PFNEGLDESTROYIMAGEKHRPROC egl_destroy_image_khr = | 13 static PFNEGLDESTROYIMAGEKHRPROC egl_destroy_image_khr = |
12 reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>( | 14 reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>( |
13 eglGetProcAddress("eglDestroyImageKHR")); | 15 eglGetProcAddress("eglDestroyImageKHR")); |
14 | 16 |
15 static bool AreEGLExtensionsInitialized() { | 17 static bool AreEGLExtensionsInitialized() { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 64 |
63 void Gles2TextureToEglImageTranslator::DestroyEglImage(EGLImageKHR egl_image) { | 65 void Gles2TextureToEglImageTranslator::DestroyEglImage(EGLImageKHR egl_image) { |
64 // Clients of this class will call this method for each EGLImage handle. | 66 // Clients of this class will call this method for each EGLImage handle. |
65 // Actual destroying of the handles is done here. | 67 // Actual destroying of the handles is done here. |
66 if (!egl_destroy_image_khr) { | 68 if (!egl_destroy_image_khr) { |
67 LOG(ERROR) << "egl_destroy_image_khr failed"; | 69 LOG(ERROR) << "egl_destroy_image_khr failed"; |
68 return; | 70 return; |
69 } | 71 } |
70 egl_destroy_image_khr(egl_display_, egl_image); | 72 egl_destroy_image_khr(egl_display_, egl_image); |
71 } | 73 } |
72 | |
73 | |
OLD | NEW |