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

Side by Side Diff: content/renderer/gpu/gpu_video_decode_accelerator_host.h

Issue 7361010: Enable fire-and-forget Destroy of HW video decoder, and misc other improvements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: vrk CR responses. Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CONTENT_RENDERER_GPU_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ 5 #ifndef CONTENT_RENDERER_GPU_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_
6 #define CONTENT_RENDERER_GPU_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ 6 #define CONTENT_RENDERER_GPU_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 void OnProvidePictureBuffer( 60 void OnProvidePictureBuffer(
61 uint32 num_requested_buffers, const gfx::Size& buffer_size, int32 mem_type); 61 uint32 num_requested_buffers, const gfx::Size& buffer_size, int32 mem_type);
62 void OnDismissPictureBuffer(int32 picture_buffer_id); 62 void OnDismissPictureBuffer(int32 picture_buffer_id);
63 void OnInitializeDone(); 63 void OnInitializeDone();
64 void OnPictureReady(int32 picture_buffer_id, 64 void OnPictureReady(int32 picture_buffer_id,
65 int32 bitstream_buffer_id, 65 int32 bitstream_buffer_id,
66 const gfx::Size& visible_size, 66 const gfx::Size& visible_size,
67 const gfx::Size& decoded_size); 67 const gfx::Size& decoded_size);
68 void OnFlushDone(); 68 void OnFlushDone();
69 void OnResetDone(); 69 void OnResetDone();
70 void OnDestroyDone();
71 void OnEndOfStream(); 70 void OnEndOfStream();
72 void OnErrorNotification(uint32 error); 71 void OnErrorNotification(uint32 error);
73 72
74 // Sends IPC messages to the Gpu process. 73 // Sends IPC messages to the Gpu process.
75 IPC::Message::Sender* ipc_sender_; 74 IPC::Message::Sender* ipc_sender_;
76 75
77 // Route ID for the command buffer associated with the context the GPU Video 76 // Route ID for the command buffer associated with the context the GPU Video
78 // Decoder uses. 77 // Decoder uses.
79 // TODO(fischman): storing route_id's for GPU process entities in the renderer 78 // TODO(fischman): storing route_id's for GPU process entities in the renderer
80 // process is vulnerable to GPU process crashing & being respawned, and 79 // process is vulnerable to GPU process crashing & being respawned, and
81 // attempting to use an outdated or reused route id. 80 // attempting to use an outdated or reused route id.
82 int32 command_buffer_route_id_; 81 int32 command_buffer_route_id_;
83 82
84 // Helper for the command buffer associated with the context the GPU Video 83 // Helper for the command buffer associated with the context the GPU Video
85 // Decoder uses. 84 // Decoder uses.
86 // TODO(fischman): in the out-of-process case, this won't work 85 // TODO(fischman): in the out-of-process case, this won't work
87 // (context3d->gles2_impl() will be NULL), and will have to be replaced with a 86 // (context3d->gles2_impl() will be NULL), and will have to be replaced with a
88 // dedicated message such as WaitForToken, which will serialize subsequent 87 // dedicated message such as WaitForToken, which will serialize subsequent
89 // message processing behind it. 88 // message processing behind it.
90 gpu::CommandBufferHelper* cmd_buffer_helper_; 89 gpu::CommandBufferHelper* cmd_buffer_helper_;
91 90
92 // Reference to the client that will receive callbacks from the decoder. 91 // Reference to the client that will receive callbacks from the decoder.
93 media::VideoDecodeAccelerator::Client* client_; 92 media::VideoDecodeAccelerator::Client* client_;
94 93
95 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost); 94 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecodeAcceleratorHost);
96 }; 95 };
97 96
98 #endif // CONTENT_RENDERER_GPU_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_ 97 #endif // CONTENT_RENDERER_GPU_GPU_VIDEO_DECODE_ACCELERATOR_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698