| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/gpu/media/gles2_texture_to_egl_image_translator.h" | 5 #include "content/common/gpu/media/gles2_texture_to_egl_image_translator.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_pump_x.h" | 8 #if defined(TOOLKIT_USES_GTK) |
| 9 | 9 #include "base/message_pump_gtk.h" |
| 10 #elif defined(USE_AURA) |
| 11 #include "base/message_pump_aurax11.h" |
| 12 #endif |
| 10 | 13 |
| 11 // Get EGL extension functions. | 14 // Get EGL extension functions. |
| 12 static PFNEGLCREATEIMAGEKHRPROC egl_create_image_khr = | 15 static PFNEGLCREATEIMAGEKHRPROC egl_create_image_khr = |
| 13 reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>( | 16 reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>( |
| 14 eglGetProcAddress("eglCreateImageKHR")); | 17 eglGetProcAddress("eglCreateImageKHR")); |
| 15 static PFNEGLDESTROYIMAGEKHRPROC egl_destroy_image_khr = | 18 static PFNEGLDESTROYIMAGEKHRPROC egl_destroy_image_khr = |
| 16 reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>( | 19 reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>( |
| 17 eglGetProcAddress("eglDestroyImageKHR")); | 20 eglGetProcAddress("eglDestroyImageKHR")); |
| 18 static PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glegl_image_targettexture_2does = | 21 static PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glegl_image_targettexture_2does = |
| 19 reinterpret_cast<PFNGLEGLIMAGETARGETTEXTURE2DOESPROC>( | 22 reinterpret_cast<PFNGLEGLIMAGETARGETTEXTURE2DOESPROC>( |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 107 |
| 105 if (use_backing_pixmaps_) { | 108 if (use_backing_pixmaps_) { |
| 106 ImagePixmap::iterator it = eglimage_pixmap_.find(egl_image); | 109 ImagePixmap::iterator it = eglimage_pixmap_.find(egl_image); |
| 107 CHECK(it != eglimage_pixmap_.end()); | 110 CHECK(it != eglimage_pixmap_.end()); |
| 108 Pixmap pixmap = it->second; | 111 Pixmap pixmap = it->second; |
| 109 eglimage_pixmap_.erase(it); | 112 eglimage_pixmap_.erase(it); |
| 110 Display* x_display = base::MessagePumpForUI::GetDefaultXDisplay(); | 113 Display* x_display = base::MessagePumpForUI::GetDefaultXDisplay(); |
| 111 XFreePixmap(x_display, pixmap); | 114 XFreePixmap(x_display, pixmap); |
| 112 } | 115 } |
| 113 } | 116 } |
| OLD | NEW |