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

Side by Side Diff: media/gpu/avda_codec_image.cc

Issue 2697643003: media: Clean up MediaCodecBridge and remove subclasses (Closed)
Patch Set: rebase Created 3 years, 10 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
« no previous file with comments | « media/gpu/avda_codec_image.h ('k') | media/gpu/avda_picture_buffer_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "media/gpu/avda_codec_image.h" 5 #include "media/gpu/avda_codec_image.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
11 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 11 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
12 #include "gpu/command_buffer/service/texture_manager.h" 12 #include "gpu/command_buffer/service/texture_manager.h"
13 #include "media/base/android/media_codec_bridge_impl.h" 13 #include "media/base/android/media_codec_bridge_impl.h"
14 #include "media/gpu/avda_shared_state.h" 14 #include "media/gpu/avda_shared_state.h"
15 #include "ui/gl/android/surface_texture.h" 15 #include "ui/gl/android/surface_texture.h"
16 #include "ui/gl/gl_context.h" 16 #include "ui/gl/gl_context.h"
17 #include "ui/gl/scoped_make_current.h" 17 #include "ui/gl/scoped_make_current.h"
18 18
19 namespace media { 19 namespace media {
20 20
21 AVDACodecImage::AVDACodecImage( 21 AVDACodecImage::AVDACodecImage(
22 const scoped_refptr<AVDASharedState>& shared_state, 22 const scoped_refptr<AVDASharedState>& shared_state,
23 VideoCodecBridge* codec, 23 MediaCodecBridge* codec,
24 const base::WeakPtr<gpu::gles2::GLES2Decoder>& decoder) 24 const base::WeakPtr<gpu::gles2::GLES2Decoder>& decoder)
25 : shared_state_(shared_state), 25 : shared_state_(shared_state),
26 codec_buffer_index_(kInvalidCodecBufferIndex), 26 codec_buffer_index_(kInvalidCodecBufferIndex),
27 media_codec_(codec), 27 media_codec_(codec),
28 decoder_(decoder), 28 decoder_(decoder),
29 has_surface_texture_(false), 29 has_surface_texture_(false),
30 texture_(0) {} 30 texture_(0) {}
31 31
32 AVDACodecImage::~AVDACodecImage() {} 32 AVDACodecImage::~AVDACodecImage() {}
33 33
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 230
231 bool AVDACodecImage::IsCodecBufferOutstanding() const { 231 bool AVDACodecImage::IsCodecBufferOutstanding() const {
232 static_assert(kUpdateOnly < 0 && kUpdateOnly > kRendered && 232 static_assert(kUpdateOnly < 0 && kUpdateOnly > kRendered &&
233 kRendered > kInvalidCodecBufferIndex, 233 kRendered > kInvalidCodecBufferIndex,
234 "Codec buffer index enum values are not ordered correctly."); 234 "Codec buffer index enum values are not ordered correctly.");
235 return codec_buffer_index_ > kRendered && media_codec_; 235 return codec_buffer_index_ > kRendered && media_codec_;
236 } 236 }
237 237
238 } // namespace media 238 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/avda_codec_image.h ('k') | media/gpu/avda_picture_buffer_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698