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

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

Issue 1993173002: Fix "unused variable" warnings. (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
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
(...skipping 12 matching lines...) Expand all
23 int picture_buffer_id, 23 int picture_buffer_id,
24 const scoped_refptr<AVDASharedState>& shared_state, 24 const scoped_refptr<AVDASharedState>& shared_state,
25 media::VideoCodecBridge* codec, 25 media::VideoCodecBridge* codec,
26 const base::WeakPtr<gpu::gles2::GLES2Decoder>& decoder, 26 const base::WeakPtr<gpu::gles2::GLES2Decoder>& decoder,
27 const scoped_refptr<gfx::SurfaceTexture>& surface_texture) 27 const scoped_refptr<gfx::SurfaceTexture>& surface_texture)
28 : shared_state_(shared_state), 28 : shared_state_(shared_state),
29 codec_buffer_index_(kInvalidCodecBufferIndex), 29 codec_buffer_index_(kInvalidCodecBufferIndex),
30 media_codec_(codec), 30 media_codec_(codec),
31 decoder_(decoder), 31 decoder_(decoder),
32 surface_texture_(surface_texture), 32 surface_texture_(surface_texture),
33 detach_surface_texture_on_destruction_(false),
34 texture_(0), 33 texture_(0),
35 picture_buffer_id_(picture_buffer_id) { 34 picture_buffer_id_(picture_buffer_id) {
36 // Default to a sane guess of "flip Y", just in case we can't get 35 // Default to a sane guess of "flip Y", just in case we can't get
37 // the matrix on the first call. 36 // the matrix on the first call.
38 memset(gl_matrix_, 0, sizeof(gl_matrix_)); 37 memset(gl_matrix_, 0, sizeof(gl_matrix_));
39 gl_matrix_[0] = gl_matrix_[10] = gl_matrix_[15] = 1.0f; 38 gl_matrix_[0] = gl_matrix_[10] = gl_matrix_[15] = 1.0f;
40 gl_matrix_[5] = -1.0f; 39 gl_matrix_[5] = -1.0f;
41 shared_state_->SetImageForPicture(picture_buffer_id_, this); 40 shared_state_->SetImageForPicture(picture_buffer_id_, this);
42 } 41 }
43 42
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 277 }
279 278
280 bool AVDACodecImage::IsCodecBufferOutstanding() const { 279 bool AVDACodecImage::IsCodecBufferOutstanding() const {
281 static_assert(kUpdateOnly < 0 && kUpdateOnly > kRendered && 280 static_assert(kUpdateOnly < 0 && kUpdateOnly > kRendered &&
282 kRendered > kInvalidCodecBufferIndex, 281 kRendered > kInvalidCodecBufferIndex,
283 "Codec buffer index enum values are not ordered correctly."); 282 "Codec buffer index enum values are not ordered correctly.");
284 return codec_buffer_index_ > kRendered && media_codec_; 283 return codec_buffer_index_ > kRendered && media_codec_;
285 } 284 }
286 285
287 } // namespace media 286 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698