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

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

Issue 2916193002: Reset |most_recent_bounds_| on new Overlay (Closed)
Patch Set: Typo Created 3 years, 6 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 | « no previous file | no next file » | 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
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 has_surface_texture_ = has_surface_texture; 141 has_surface_texture_ = has_surface_texture;
142 codec_buffer_index_ = buffer_index; 142 codec_buffer_index_ = buffer_index;
143 size_ = size; 143 size_ = size;
144 } 144 }
145 145
146 bool AVDACodecImage::SetSharedState( 146 bool AVDACodecImage::SetSharedState(
147 scoped_refptr<AVDASharedState> shared_state) { 147 scoped_refptr<AVDASharedState> shared_state) {
148 if (shared_state == shared_state_) 148 if (shared_state == shared_state_)
149 return false; 149 return false;
150 shared_state_ = shared_state; 150 shared_state_ = shared_state;
151 most_recent_bounds_ = gfx::Rect();
151 return true; 152 return true;
152 } 153 }
153 154
154 void AVDACodecImage::UpdateSurfaceInternal( 155 void AVDACodecImage::UpdateSurfaceInternal(
155 UpdateMode update_mode, 156 UpdateMode update_mode,
156 RestoreBindingsMode attached_bindings_mode) { 157 RestoreBindingsMode attached_bindings_mode) {
157 if (!IsCodecBufferOutstanding()) 158 if (!IsCodecBufferOutstanding())
158 return; 159 return;
159 160
160 ReleaseOutputBuffer(update_mode); 161 ReleaseOutputBuffer(update_mode);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 233 }
233 234
234 bool AVDACodecImage::IsCodecBufferOutstanding() const { 235 bool AVDACodecImage::IsCodecBufferOutstanding() const {
235 static_assert(kUpdateOnly < 0 && kUpdateOnly > kRendered && 236 static_assert(kUpdateOnly < 0 && kUpdateOnly > kRendered &&
236 kRendered > kInvalidCodecBufferIndex, 237 kRendered > kInvalidCodecBufferIndex,
237 "Codec buffer index enum values are not ordered correctly."); 238 "Codec buffer index enum values are not ordered correctly.");
238 return codec_buffer_index_ > kRendered && media_codec_; 239 return codec_buffer_index_ > kRendered && media_codec_;
239 } 240 }
240 241
241 } // namespace media 242 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698