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

Side by Side Diff: media/gpu/ipc/service/gpu_video_decode_accelerator.cc

Issue 2382113002: Use clearer names for the PictureBuffer texture id members (Closed)
Patch Set: Added comments Created 4 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ipc/service/gpu_video_decode_accelerator.h" 5 #include "media/gpu/ipc/service/gpu_video_decode_accelerator.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 texture_manager->SetLevelInfo(texture_ref, texture_target_, 0, format, 459 texture_manager->SetLevelInfo(texture_ref, texture_target_, 0, format,
460 width, height, 1, 0, format, 0, 460 width, height, 1, 0, format, 0,
461 gfx::Rect()); 461 gfx::Rect());
462 } 462 }
463 } 463 }
464 service_ids.push_back(texture_ref->service_id()); 464 service_ids.push_back(texture_ref->service_id());
465 current_textures.push_back(texture_ref); 465 current_textures.push_back(texture_ref);
466 } 466 }
467 textures.push_back(current_textures); 467 textures.push_back(current_textures);
468 buffers.push_back(PictureBuffer(buffer_ids[i], texture_dimensions_, 468 buffers.push_back(PictureBuffer(buffer_ids[i], texture_dimensions_,
469 service_ids, buffer_texture_ids)); 469 buffer_texture_ids, service_ids));
470 } 470 }
471 { 471 {
472 DebugAutoLock auto_lock(debug_uncleared_textures_lock_); 472 DebugAutoLock auto_lock(debug_uncleared_textures_lock_);
473 for (uint32_t i = 0; i < buffer_ids.size(); ++i) 473 for (uint32_t i = 0; i < buffer_ids.size(); ++i)
474 uncleared_textures_[buffer_ids[i]] = textures[i]; 474 uncleared_textures_[buffer_ids[i]] = textures[i];
475 } 475 }
476 video_decode_accelerator_->AssignPictureBuffers(buffers); 476 video_decode_accelerator_->AssignPictureBuffers(buffers);
477 } 477 }
478 478
479 void GpuVideoDecodeAccelerator::OnReusePictureBuffer( 479 void GpuVideoDecodeAccelerator::OnReusePictureBuffer(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 GLenum target = texture_ref->texture()->target(); 514 GLenum target = texture_ref->texture()->target();
515 gpu::gles2::TextureManager* texture_manager = 515 gpu::gles2::TextureManager* texture_manager =
516 stub_->decoder()->GetContextGroup()->texture_manager(); 516 stub_->decoder()->GetContextGroup()->texture_manager();
517 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); 517 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0));
518 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); 518 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true);
519 } 519 }
520 uncleared_textures_.erase(it); 520 uncleared_textures_.erase(it);
521 } 521 }
522 522
523 } // namespace media 523 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/ipc/client/gpu_video_decode_accelerator_host.cc ('k') | media/gpu/v4l2_slice_video_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698