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

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

Issue 1939683002: Test X11 header pollution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « media/gpu/avda_codec_image.h ('k') | media/gpu/avda_return_on_failure.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 "content/common/gpu/media/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 "base/metrics/histogram_macros.h" 11 #include "base/metrics/histogram_macros.h"
12 #include "content/common/gpu/media/avda_shared_state.h"
13 #include "gpu/command_buffer/service/context_group.h" 12 #include "gpu/command_buffer/service/context_group.h"
14 #include "gpu/command_buffer/service/context_state.h" 13 #include "gpu/command_buffer/service/context_state.h"
15 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 14 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
16 #include "gpu/command_buffer/service/texture_manager.h" 15 #include "gpu/command_buffer/service/texture_manager.h"
16 #include "media/gpu/avda_shared_state.h"
17 #include "ui/gl/android/surface_texture.h" 17 #include "ui/gl/android/surface_texture.h"
18 #include "ui/gl/gl_context.h" 18 #include "ui/gl/gl_context.h"
19 #include "ui/gl/scoped_make_current.h" 19 #include "ui/gl/scoped_make_current.h"
20 20
21 namespace content { 21 namespace media {
22 22
23 AVDACodecImage::AVDACodecImage( 23 AVDACodecImage::AVDACodecImage(
24 int picture_buffer_id, 24 int picture_buffer_id,
25 const scoped_refptr<AVDASharedState>& shared_state, 25 const scoped_refptr<AVDASharedState>& shared_state,
26 media::VideoCodecBridge* codec, 26 media::VideoCodecBridge* codec,
27 const base::WeakPtr<gpu::gles2::GLES2Decoder>& decoder, 27 const base::WeakPtr<gpu::gles2::GLES2Decoder>& decoder,
28 const scoped_refptr<gfx::SurfaceTexture>& surface_texture) 28 const scoped_refptr<gfx::SurfaceTexture>& surface_texture)
29 : shared_state_(shared_state), 29 : shared_state_(shared_state),
30 codec_buffer_index_(kInvalidCodecBufferIndex), 30 codec_buffer_index_(kInvalidCodecBufferIndex),
31 media_codec_(codec), 31 media_codec_(codec),
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // Our current matrix may be stale. Update it if possible. 277 // Our current matrix may be stale. Update it if possible.
278 if (surface_texture_) 278 if (surface_texture_)
279 UpdateSurface(UpdateMode::RENDER_TO_FRONT_BUFFER); 279 UpdateSurface(UpdateMode::RENDER_TO_FRONT_BUFFER);
280 memcpy(matrix, gl_matrix_, sizeof(gl_matrix_)); 280 memcpy(matrix, gl_matrix_, sizeof(gl_matrix_));
281 } 281 }
282 282
283 bool AVDACodecImage::IsCodecBufferOutstanding() const { 283 bool AVDACodecImage::IsCodecBufferOutstanding() const {
284 return codec_buffer_index_ != kInvalidCodecBufferIndex && media_codec_; 284 return codec_buffer_index_ != kInvalidCodecBufferIndex && media_codec_;
285 } 285 }
286 286
287 } // namespace content 287 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/avda_codec_image.h ('k') | media/gpu/avda_return_on_failure.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698