Commit 3943be26 authored by fischman@chromium.org's avatar fischman@chromium.org

Delete dead code: OmxVideoDecodeAccelerator is unused.

OVDA has been dead code in the tree since 3/13 and m27
https://gerrit.chromium.org/gerrit/gitweb?p=chromiumos/platform/login_manager.git;a=commit;h=934e55cd90c2fd7a5b89fe201b251d542e896f46

BUG=223194
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/21584002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215933 0039d316-1c4b-4281-b951-d872f2087c98
parent 6dc17931
......@@ -134,7 +134,6 @@ std::string DeriveCommandLine(const GURL& start_url,
#endif
::switches::kUseGL,
::switches::kUserDataDir,
::switches::kUseExynosVda,
::switches::kV,
::switches::kEnableWebGLDraftExtensions,
ash::switches::kAshDefaultGuestWallpaperLarge,
......
......@@ -1156,7 +1156,6 @@ bool GpuProcessHost::LaunchGpuProcess(const std::string& channel_id) {
switches::kReduceGpuSandbox,
switches::kTestGLLib,
switches::kTraceStartup,
switches::kUseExynosVda,
switches::kV,
switches::kVModule,
#if defined(OS_MACOSX)
......
......@@ -4,7 +4,6 @@ include_rules = [
"+libGLESv2",
"+media/video/video_decode_accelerator.h",
"+skia",
"+third_party/openmax",
"+third_party/mesa",
# For single process mode
......
// Copyright (c) 2012 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/media/gles2_texture_to_egl_image_translator.h"
#include "base/logging.h"
#if defined(TOOLKIT_USES_GTK)
#include "base/message_loop/message_pump_gtk.h"
#elif defined(USE_AURA)
#include "base/message_loop/message_pump_aurax11.h"
#endif
namespace content {
Gles2TextureToEglImageTranslator::Gles2TextureToEglImageTranslator(
bool use_backing_pixmaps)
: use_backing_pixmaps_(use_backing_pixmaps) {
}
Gles2TextureToEglImageTranslator::~Gles2TextureToEglImageTranslator() {
}
EGLImageKHR Gles2TextureToEglImageTranslator::TranslateToEglImage(
EGLDisplay egl_display, EGLContext egl_context,
uint32 texture,
const gfx::Size& dimensions) {
EGLImageKHR hEglImage;
if (use_backing_pixmaps_) {
EGLint image_attrs[] = { EGL_IMAGE_PRESERVED_KHR, 1 , EGL_NONE };
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, texture);
Display* x_display = base::MessagePumpForUI::GetDefaultXDisplay();
Pixmap pixmap = XCreatePixmap(x_display, RootWindow(x_display, 0),
dimensions.width(),
dimensions.height(), 32);
hEglImage = eglCreateImageKHR(egl_display,
EGL_NO_CONTEXT,
EGL_NATIVE_PIXMAP_KHR,
(EGLClientBuffer)pixmap,
image_attrs);
glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, hEglImage);
bool inserted = eglimage_pixmap_.insert(std::make_pair(
hEglImage, pixmap)).second;
DCHECK(inserted);
} else {
EGLint attrib = EGL_NONE;
// Create an EGLImage
hEglImage = eglCreateImageKHR(egl_display,
egl_context,
EGL_GL_TEXTURE_2D_KHR,
reinterpret_cast<EGLClientBuffer>(texture),
&attrib);
}
CHECK(hEglImage) << "Failed to eglCreateImageKHR for " << texture
<< ", error: 0x" << std::hex << eglGetError();
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(
EGLDisplay egl_display, EGLImageKHR egl_image) {
// Clients of this class will call this method for each EGLImage handle.
// Actual destroying of the handles is done here.
eglDestroyImageKHR(egl_display, egl_image);
if (use_backing_pixmaps_) {
ImagePixmap::iterator it = eglimage_pixmap_.find(egl_image);
CHECK(it != eglimage_pixmap_.end());
Pixmap pixmap = it->second;
eglimage_pixmap_.erase(it);
Display* x_display = base::MessagePumpForUI::GetDefaultXDisplay();
XFreePixmap(x_display, pixmap);
}
}
} // namespace content
// Copyright (c) 2012 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.
#ifndef CONTENT_COMMON_GPU_MEDIA_GLES2_TEXTURE_TO_EGL_IMAGE_TRANSLATOR_H_
#define CONTENT_COMMON_GPU_MEDIA_GLES2_TEXTURE_TO_EGL_IMAGE_TRANSLATOR_H_
#include <map>
#include "base/basictypes.h"
#include "media/video/picture.h"
#include "ui/gl/gl_bindings.h"
namespace content {
// Class to wrap egl-opengles related operations.
// PPAPI will give the textures to OmxVideoDecodeAccelerator.
// OmxVideoDecodeAccelerator will use this class to convert
// these texture into EGLImage and back.
class Gles2TextureToEglImageTranslator {
public:
Gles2TextureToEglImageTranslator(bool use_backing_pixmaps);
~Gles2TextureToEglImageTranslator();
// Translates texture into EGLImage and back.
EGLImageKHR TranslateToEglImage(EGLDisplay egl_display,
EGLContext egl_context,
uint32 texture,
const gfx::Size& dimensions);
uint32 TranslateToTexture(EGLImageKHR egl_image);
void DestroyEglImage(EGLDisplay egl_display, EGLImageKHR egl_image);
private:
bool use_backing_pixmaps_;
typedef std::map<EGLImageKHR, Pixmap> ImagePixmap;
ImagePixmap eglimage_pixmap_;
DISALLOW_COPY_AND_ASSIGN(Gles2TextureToEglImageTranslator);
};
} // namespace content
#endif // CONTENT_COMMON_GPU_MEDIA_GLES2_TEXTURE_TO_EGL_IMAGE_TRANSLATOR_H_
......@@ -25,7 +25,6 @@
#include "content/common/gpu/media/dxva_video_decode_accelerator.h"
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
#include "content/common/gpu/media/exynos_video_decode_accelerator.h"
#include "content/common/gpu/media/omx_video_decode_accelerator.h"
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
#include "ui/gl/gl_context_glx.h"
#include "content/common/gpu/media/vaapi_video_decode_accelerator.h"
......@@ -176,19 +175,11 @@ void GpuVideoDecodeAccelerator::Initialize(
video_decode_accelerator_.reset(new DXVAVideoDecodeAccelerator(
this, make_context_current_));
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseExynosVda)) {
video_decode_accelerator_.reset(new ExynosVideoDecodeAccelerator(
gfx::GLSurfaceEGL::GetHardwareDisplay(),
stub_->decoder()->GetGLContext()->GetHandle(),
this,
make_context_current_));
} else {
video_decode_accelerator_.reset(new OmxVideoDecodeAccelerator(
gfx::GLSurfaceEGL::GetHardwareDisplay(),
stub_->decoder()->GetGLContext()->GetHandle(),
this,
make_context_current_));
}
video_decode_accelerator_.reset(new ExynosVideoDecodeAccelerator(
gfx::GLSurfaceEGL::GetHardwareDisplay(),
stub_->decoder()->GetGLContext()->GetHandle(),
this,
make_context_current_));
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
gfx::GLContextGLX* glx_context =
static_cast<gfx::GLContextGLX*>(stub_->decoder()->GetGLContext());
......
......@@ -496,7 +496,7 @@ class GLRenderingVDAClient : public VideoDecodeAccelerator::Client {
void SetState(ClientState new_state);
// Delete the associated OMX decoder helper.
// Delete the associated decoder helper.
void DeleteDecoder();
// Compute & return the first encoded bytes (including a start frame) to send
......
......@@ -483,14 +483,9 @@
'sources': [
'common/gpu/media/exynos_video_decode_accelerator.cc',
'common/gpu/media/exynos_video_decode_accelerator.h',
'common/gpu/media/gles2_texture_to_egl_image_translator.cc',
'common/gpu/media/gles2_texture_to_egl_image_translator.h',
'common/gpu/media/omx_video_decode_accelerator.cc',
'common/gpu/media/omx_video_decode_accelerator.h',
],
'include_dirs': [
'<(DEPTH)/third_party/khronos',
'<(DEPTH)/third_party/openmax/il',
],
'link_settings': {
'libraries': [
......
......@@ -72,11 +72,6 @@
},
],
}],
['target_arch=="arm" and chromeos == 1', {
'include_dirs': [
'<(DEPTH)/third_party/openmax/il',
],
}],
['target_arch!="arm" and chromeos == 1', {
'include_dirs': [
'<(DEPTH)/third_party/libva',
......
......@@ -1096,11 +1096,6 @@
['exclude', '^common/gpu/media/android_video_decode_accelerator_unittest.cc'],
],
}],
['target_arch=="arm"', {
'include_dirs': [
'<(DEPTH)/third_party/openmax/il',
],
}],
['OS=="win"', {
'dependencies': [
'../third_party/angle_dx11/src/build_angle.gyp:libEGL',
......
......@@ -353,10 +353,7 @@ bool WarmUpSandbox(const CommandLine& command_line) {
}
#if defined(OS_CHROMEOS) && defined(ARCH_CPU_ARMEL) && defined(USE_X11)
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseExynosVda))
ExynosVideoDecodeAccelerator::PreSandboxInitialization();
else
OmxVideoDecodeAccelerator::PreSandboxInitialization();
ExynosVideoDecodeAccelerator::PreSandboxInitialization();
#elif defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) && defined(USE_X11)
VaapiWrapper::PreSandboxInitialization();
#endif
......
......@@ -870,9 +870,6 @@ const char kDefaultTileHeight[] = "default-tile-height";
const char kMaxUntiledLayerWidth[] = "max-untiled-layer-width";
const char kMaxUntiledLayerHeight[] = "max-untiled-layer-height";
// Use ExynosVideoDecodeAccelerator for video decode (instead of SECOMX)
const char kUseExynosVda[] = "use-exynos-vda";
const char kEnableFixedPositionCreatesStackingContext[]
= "enable-fixed-position-creates-stacking-context";
const char kDisableFixedPositionCreatesStackingContext[]
......
......@@ -228,7 +228,6 @@ extern const char kTraceStartup[];
extern const char kTraceStartupFile[];
extern const char kTraceStartupDuration[];
CONTENT_EXPORT extern const char kUIPrioritizeInGpuProcess[];
CONTENT_EXPORT extern const char kUseExynosVda[];
CONTENT_EXPORT extern const char kUserAgent[];
extern const char kUtilityCmdPrefix[];
CONTENT_EXPORT extern const char kUtilityProcess[];
......
......@@ -3,7 +3,6 @@ include_rules = [
"+jni",
"+third_party/ffmpeg",
"+third_party/libvpx",
"+third_party/openmax",
"+third_party/opus",
"+third_party/skia",
"+ui/gfx",
......
fischman@chromium.org
posciak@chromium.org
Name: OpenMAX IL
Short Name: openmax
URL: http://www.khronos.org/openmax/
Version: 1.1.2
License: BSD
License File: il/LICENSE
Security Critical: yes
Description:
Header files required to work with OpenMAX IL.
From http://www.khronos.org/openmax/headers/omx_il_v1_1/omx_il_v1_1_2_headers.zip
Local Modifications:
- Converted to utf-8 with: vim +"argdo write ++enc=utf-8" *.h
# Copyright (c) 2010 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.
#
# Functions from OpenMAX IL used in Chromium code.
OMX_ERRORTYPE OMX_Init(void);
OMX_ERRORTYPE OMX_Deinit(void);
OMX_ERRORTYPE OMX_GetHandle(OMX_HANDLETYPE* pHandle, OMX_STRING cComponentName, OMX_PTR pAppData, OMX_CALLBACKTYPE* pCallBacks);
OMX_ERRORTYPE OMX_FreeHandle(OMX_HANDLETYPE hComponent);
OMX_ERRORTYPE OMX_GetComponentsOfRole (OMX_STRING role, OMX_U32* pNumComps, OMX_U8** compNames);
Copyright (c) 2008 The Khronos Group Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This diff is collapsed.
This diff is collapsed.
/*
* Copyright (c) 2008 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
/** OMX_ContentPipe.h - OpenMax IL version 1.1.2
* The OMX_ContentPipe header file contains the definitions used to define
* the public interface for content piples. This header file is intended to
* be used by the component.
*/
#ifndef OMX_CONTENTPIPE_H
#define OMX_CONTENTPIPE_H
#ifndef KD_EACCES
/* OpenKODE error codes. CPResult values may be zero (indicating success
or one of the following values) */
#define KD_EACCES (1)
#define KD_EADDRINUSE (2)
#define KD_EAGAIN (5)
#define KD_EBADF (7)
#define KD_EBUSY (8)
#define KD_ECONNREFUSED (9)
#define KD_ECONNRESET (10)
#define KD_EDEADLK (11)
#define KD_EDESTADDRREQ (12)
#define KD_ERANGE (35)
#define KD_EEXIST (13)
#define KD_EFBIG (14)
#define KD_EHOSTUNREACH (15)
#define KD_EINVAL (17)
#define KD_EIO (18)
#define KD_EISCONN (20)
#define KD_EISDIR (21)
#define KD_EMFILE (22)
#define KD_ENAMETOOLONG (23)
#define KD_ENOENT (24)
#define KD_ENOMEM (25)
#define KD_ENOSPC (26)
#define KD_ENOSYS (27)
#define KD_ENOTCONN (28)
#define KD_EPERM (33)
#define KD_ETIMEDOUT (36)
#define KD_EILSEQ (19)
#endif
/** Map types from OMX standard types only here so interface is as generic as possible. */
typedef OMX_U32 CPresult;
typedef char * CPstring;
typedef void * CPhandle;
typedef OMX_U32 CPuint;
typedef OMX_S32 CPint;
typedef char CPbyte;
typedef OMX_BOOL CPbool;
/** enumeration of origin types used in the CP_PIPETYPE's Seek function
* @ingroup cp
*/
typedef enum CP_ORIGINTYPE {
CP_OriginBegin,
CP_OriginCur,
CP_OriginEnd,
CP_OriginKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
CP_OriginVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
CP_OriginMax = 0X7FFFFFFF
} CP_ORIGINTYPE;
/** enumeration of contact access types used in the CP_PIPETYPE's Open function
* @ingroup cp
*/
typedef enum CP_ACCESSTYPE {
CP_AccessRead,
CP_AccessWrite,
CP_AccessReadWrite ,
CP_AccessKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
CP_AccessVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
CP_AccessMax = 0X7FFFFFFF
} CP_ACCESSTYPE;
/** enumeration of results returned by the CP_PIPETYPE's CheckAvailableBytes function
* @ingroup cp
*/
typedef enum CP_CHECKBYTESRESULTTYPE
{
CP_CheckBytesOk, /**< There are at least the request number
of bytes available */
CP_CheckBytesNotReady, /**< The pipe is still retrieving bytes
and presently lacks sufficient bytes.
Client will be called when they are
sufficient bytes are available. */
CP_CheckBytesInsufficientBytes , /**< The pipe has retrieved all bytes
but those available are less than those
requested */
CP_CheckBytesAtEndOfStream, /**< The pipe has reached the end of stream
and no more bytes are available. */
CP_CheckBytesOutOfBuffers, /**< All read/write buffers are currently in use. */
CP_CheckBytesKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
CP_CheckBytesVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
CP_CheckBytesMax = 0X7FFFFFFF
} CP_CHECKBYTESRESULTTYPE;
/** enumeration of content pipe events sent to the client callback.
* @ingroup cp
*/
typedef enum CP_EVENTTYPE{
CP_BytesAvailable, /** bytes requested in a CheckAvailableBytes call are now available*/
CP_Overflow, /** enumeration of content pipe events sent to the client callback*/
CP_PipeDisconnected , /** enumeration of content pipe events sent to the client callback*/
CP_EventKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */
CP_EventVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */
CP_EventMax = 0X7FFFFFFF
} CP_EVENTTYPE;
/** content pipe definition
* @ingroup cp
*/
typedef struct CP_PIPETYPE
{
/** Open a content stream for reading or writing. */
CPresult (*Open)( CPhandle* hContent, CPstring szURI, CP_ACCESSTYPE eAccess );
/** Close a content stream. */
CPresult (*Close)( CPhandle hContent );
/** Create a content source and open it for writing. */
CPresult (*Create)( CPhandle *hContent, CPstring szURI );
/** Check the that specified number of bytes are available for reading or writing (depending on access type).*/
CPresult (*CheckAvailableBytes)( CPhandle hContent, CPuint nBytesRequested, CP_CHECKBYTESRESULTTYPE *eResult );
/** Seek to certain position in the content relative to the specified origin. */
CPresult (*SetPosition)( CPhandle hContent, CPint nOffset, CP_ORIGINTYPE eOrigin);
/** Retrieve the current position relative to the start of the content. */
CPresult (*GetPosition)( CPhandle hContent, CPuint *pPosition);
/** Retrieve data of the specified size from the content stream (advance content pointer by size of data).
Note: pipe client provides pointer. This function is appropriate for small high frequency reads. */
CPresult (*Read)( CPhandle hContent, CPbyte *pData, CPuint nSize);
/** Retrieve a buffer allocated by the pipe that contains the requested number of bytes.
Buffer contains the next block of bytes, as specified by nSize, of the content. nSize also
returns the size of the block actually read. Content pointer advances the by the returned size.
Note: pipe provides pointer. This function is appropriate for large reads. The client must call
ReleaseReadBuffer when done with buffer.
In some cases the requested block may not reside in contiguous memory within the
pipe implementation. For instance if the pipe leverages a circular buffer then the requested
block may straddle the boundary of the circular buffer. By default a pipe implementation
performs a copy in this case to provide the block to the pipe client in one contiguous buffer.
If, however, the client sets bForbidCopy, then the pipe returns only those bytes preceding the memory
boundary. Here the client may retrieve the data in segments over successive calls. */
CPresult (*ReadBuffer)( CPhandle hContent, CPbyte **ppBuffer, CPuint *nSize, CPbool bForbidCopy);
/** Release a buffer obtained by ReadBuffer back to the pipe. */
CPresult (*ReleaseReadBuffer)(CPhandle hContent, CPbyte *pBuffer);
/** Write data of the specified size to the content (advance content pointer by size of data).
Note: pipe client provides pointer. This function is appropriate for small high frequency writes. */
CPresult (*Write)( CPhandle hContent, CPbyte *data, CPuint nSize);
/** Retrieve a buffer allocated by the pipe used to write data to the content.
Client will fill buffer with output data. Note: pipe provides pointer. This function is appropriate
for large writes. The client must call WriteBuffer when done it has filled the buffer with data.*/
CPresult (*GetWriteBuffer)( CPhandle hContent, CPbyte **ppBuffer, CPuint nSize);
/** Deliver a buffer obtained via GetWriteBuffer to the pipe. Pipe will write the
the contents of the buffer to content and advance content pointer by the size of the buffer */
CPresult (*WriteBuffer)( CPhandle hContent, CPbyte *pBuffer, CPuint nFilledSize);
/** Register a per-handle client callback with the content pipe. */
CPresult (*RegisterCallback)( CPhandle hContent, CPresult (*ClientCallback)(CP_EVENTTYPE eEvent, CPuint iParam));
} CP_PIPETYPE;
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// These are some extra includes needed in the generated stub file for defining
// various OpenMAX types.
extern "C" {
#include "third_party/openmax/il/OMX_Core.h"
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment