Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: content/common/gpu/gles2_texture_to_egl_image_translator.cc

Issue 6979017: Revert 86681 - Updated OMX decoder for recent PPAPI changes, and added to the build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/gles2_texture_to_egl_image_translator.cc
===================================================================
--- content/common/gpu/gles2_texture_to_egl_image_translator.cc (revision 86686)
+++ content/common/gpu/gles2_texture_to_egl_image_translator.cc (working copy)
@@ -1,73 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/common/gpu/gles2_texture_to_egl_image_translator.h"
-
-#include "base/logging.h"
-
-// Get EGL extension functions.
-static PFNEGLCREATEIMAGEKHRPROC egl_create_image_khr =
- reinterpret_cast<PFNEGLCREATEIMAGEKHRPROC>(
- eglGetProcAddress("eglCreateImageKHR"));
-static PFNEGLDESTROYIMAGEKHRPROC egl_destroy_image_khr =
- reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>(
- eglGetProcAddress("eglDestroyImageKHR"));
-
-static bool AreEGLExtensionsInitialized() {
- return (egl_create_image_khr && egl_destroy_image_khr);
-}
-
-Gles2TextureToEglImageTranslator::Gles2TextureToEglImageTranslator(
- Display* display,
- int32 gles2_context_id)
- : size_(320, 240),
- egl_display_((EGLDisplay)0x1/*display*/),
- egl_context_((EGLContext)0x368b8001/*gles2_context_id*/) {
- // TODO(vhiremath@nvidia.com)
- // Replace the above hard coded values with appropriate variables.
- // size_/egl_display_/egl_context_.
- // These should be initiated from the App.
- if (!AreEGLExtensionsInitialized()) {
- LOG(DFATAL) << "Failed to get EGL extensions";
- return;
- }
-}
-
-
-Gles2TextureToEglImageTranslator::~Gles2TextureToEglImageTranslator() {
-}
-
-EGLImageKHR Gles2TextureToEglImageTranslator::TranslateToEglImage(
- uint32 texture) {
- EGLint attrib = EGL_NONE;
- if (!egl_create_image_khr)
- return EGL_NO_IMAGE_KHR;
- // Create an EGLImage
- EGLImageKHR hEglImage = egl_create_image_khr(
- egl_display_,
- egl_context_,
- EGL_GL_TEXTURE_2D_KHR,
- reinterpret_cast<EGLClientBuffer>(texture),
- &attrib);
- return hEglImage;
-}
-
-uint32 Gles2TextureToEglImageTranslator::TranslateToTexture(
- EGLImageKHR egl_image) {
- // TODO(vhiremath@nvidia.com)
- // Fill in the appropriate implementation.
- GLuint texture = 0;
- NOTIMPLEMENTED();
- return texture;
-}
-
-void Gles2TextureToEglImageTranslator::DestroyEglImage(EGLImageKHR egl_image) {
- // Clients of this class will call this method for each EGLImage handle.
- // Actual destroying of the handles is done here.
- if (!egl_destroy_image_khr) {
- LOG(ERROR) << "egl_destroy_image_khr failed";
- return;
- }
- egl_destroy_image_khr(egl_display_, egl_image);
-}
« no previous file with comments | « content/common/gpu/gles2_texture_to_egl_image_translator.h ('k') | content/common/gpu/gpu_video_decode_accelerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698