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

Side by Side Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 503253003: Remove implicit conversions from scoped_refptr to T* in content/*/gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 "content/common/gpu/media/gpu_video_decode_accelerator.h" 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> >::iterator it; 489 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> >::iterator it;
490 it = uncleared_textures_.find(picture.picture_buffer_id()); 490 it = uncleared_textures_.find(picture.picture_buffer_id());
491 if (it == uncleared_textures_.end()) 491 if (it == uncleared_textures_.end())
492 return; // the texture has been cleared 492 return; // the texture has been cleared
493 493
494 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second; 494 scoped_refptr<gpu::gles2::TextureRef> texture_ref = it->second;
495 GLenum target = texture_ref->texture()->target(); 495 GLenum target = texture_ref->texture()->target();
496 gpu::gles2::TextureManager* texture_manager = 496 gpu::gles2::TextureManager* texture_manager =
497 stub_->decoder()->GetContextGroup()->texture_manager(); 497 stub_->decoder()->GetContextGroup()->texture_manager();
498 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); 498 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0));
499 texture_manager->SetLevelCleared(texture_ref, target, 0, true); 499 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true);
500 uncleared_textures_.erase(it); 500 uncleared_textures_.erase(it);
501 } 501 }
502 502
503 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { 503 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) {
504 if (filter_.get() && io_message_loop_->BelongsToCurrentThread()) 504 if (filter_.get() && io_message_loop_->BelongsToCurrentThread())
505 return filter_->SendOnIOThread(message); 505 return filter_->SendOnIOThread(message);
506 DCHECK(child_message_loop_->BelongsToCurrentThread()); 506 DCHECK(child_message_loop_->BelongsToCurrentThread());
507 return stub_->channel()->Send(message); 507 return stub_->channel()->Send(message);
508 } 508 }
509 509
510 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message, 510 void GpuVideoDecodeAccelerator::SendCreateDecoderReply(IPC::Message* message,
511 bool succeeded) { 511 bool succeeded) {
512 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded); 512 GpuCommandBufferMsg_CreateVideoDecoder::WriteReplyParams(message, succeeded);
513 Send(message); 513 Send(message);
514 } 514 }
515 515
516 } // namespace content 516 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.cc ('k') | content/common/gpu/media/gpu_video_encode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698