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

Side by Side Diff: content/renderer/pepper/pepper_video_encoder_host.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
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/renderer/pepper/pepper_video_encoder_host.h" 5 #include "content/renderer/pepper/pepper_video_encoder_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 scoped_refptr<gpu::GpuChannelHost> channel = 523 scoped_refptr<gpu::GpuChannelHost> channel =
524 RenderThreadImpl::current()->EstablishGpuChannelSync( 524 RenderThreadImpl::current()->EstablishGpuChannelSync(
525 CAUSE_FOR_GPU_LAUNCH_PEPPERVIDEOENCODERACCELERATOR_INITIALIZE); 525 CAUSE_FOR_GPU_LAUNCH_PEPPERVIDEOENCODERACCELERATOR_INITIALIZE);
526 if (!channel) 526 if (!channel)
527 return false; 527 return false;
528 528
529 command_buffer_ = gpu::CommandBufferProxyImpl::Create( 529 command_buffer_ = gpu::CommandBufferProxyImpl::Create(
530 std::move(channel), gpu::kNullSurfaceHandle, gfx::Size(), nullptr, 530 std::move(channel), gpu::kNullSurfaceHandle, gfx::Size(), nullptr,
531 gpu::GPU_STREAM_DEFAULT, gpu::GpuStreamPriority::NORMAL, 531 gpu::GPU_STREAM_DEFAULT, gpu::GpuStreamPriority::NORMAL,
532 gpu::gles2::ContextCreationAttribHelper(), GURL::EmptyGURL(), 532 gpu::gles2::ContextCreationAttribHelper(), GURL::EmptyGURL(),
533 gfx::PreferIntegratedGpu, base::ThreadTaskRunnerHandle::Get()); 533 gl::PreferIntegratedGpu, base::ThreadTaskRunnerHandle::Get());
534 if (!command_buffer_) { 534 if (!command_buffer_) {
535 Close(); 535 Close();
536 return false; 536 return false;
537 } 537 }
538 538
539 command_buffer_->SetGpuControlClient(this); 539 command_buffer_->SetGpuControlClient(this);
540 540
541 return true; 541 return true;
542 } 542 }
543 543
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 } 677 }
678 678
679 uint8_t* PepperVideoEncoderHost::ShmHandleToAddress(int32_t buffer_id) { 679 uint8_t* PepperVideoEncoderHost::ShmHandleToAddress(int32_t buffer_id) {
680 DCHECK(RenderThreadImpl::current()); 680 DCHECK(RenderThreadImpl::current());
681 DCHECK_GE(buffer_id, 0); 681 DCHECK_GE(buffer_id, 0);
682 DCHECK_LT(buffer_id, static_cast<int32_t>(shm_buffers_.size())); 682 DCHECK_LT(buffer_id, static_cast<int32_t>(shm_buffers_.size()));
683 return static_cast<uint8_t*>(shm_buffers_[buffer_id]->shm->memory()); 683 return static_cast<uint8_t*>(shm_buffers_[buffer_id]->shm->memory());
684 } 684 }
685 685
686 } // namespace content 686 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/browser_test_base.cc ('k') | content/renderer/pepper/ppb_graphics_3d_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698