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

Side by Side Diff: gpu/ipc/service/gpu_channel.cc

Issue 2818993002: GL Implementation for GPU Discardable
Patch Set: rebase Created 3 years, 8 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 | « gpu/ipc/service/gpu_channel.h ('k') | gpu/ipc/service/gpu_channel_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "gpu/ipc/service/gpu_channel.h" 5 #include "gpu/ipc/service/gpu_channel.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 FilteredSender::FilteredSender() = default; 558 FilteredSender::FilteredSender() = default;
559 559
560 FilteredSender::~FilteredSender() = default; 560 FilteredSender::~FilteredSender() = default;
561 561
562 GpuChannel::GpuChannel( 562 GpuChannel::GpuChannel(
563 GpuChannelManager* gpu_channel_manager, 563 GpuChannelManager* gpu_channel_manager,
564 SyncPointManager* sync_point_manager, 564 SyncPointManager* sync_point_manager,
565 GpuWatchdogThread* watchdog, 565 GpuWatchdogThread* watchdog,
566 scoped_refptr<gl::GLShareGroup> share_group, 566 scoped_refptr<gl::GLShareGroup> share_group,
567 scoped_refptr<gles2::MailboxManager> mailbox_manager, 567 scoped_refptr<gles2::MailboxManager> mailbox_manager,
568 scoped_refptr<ServiceDiscardableManager> discardable_manager,
568 scoped_refptr<PreemptionFlag> preempting_flag, 569 scoped_refptr<PreemptionFlag> preempting_flag,
569 scoped_refptr<PreemptionFlag> preempted_flag, 570 scoped_refptr<PreemptionFlag> preempted_flag,
570 scoped_refptr<base::SingleThreadTaskRunner> task_runner, 571 scoped_refptr<base::SingleThreadTaskRunner> task_runner,
571 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner, 572 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
572 int32_t client_id, 573 int32_t client_id,
573 uint64_t client_tracing_id, 574 uint64_t client_tracing_id,
574 bool is_gpu_host) 575 bool is_gpu_host)
575 : gpu_channel_manager_(gpu_channel_manager), 576 : gpu_channel_manager_(gpu_channel_manager),
576 sync_point_manager_(sync_point_manager), 577 sync_point_manager_(sync_point_manager),
577 preempting_flag_(preempting_flag), 578 preempting_flag_(preempting_flag),
578 preempted_flag_(preempted_flag), 579 preempted_flag_(preempted_flag),
579 client_id_(client_id), 580 client_id_(client_id),
580 client_tracing_id_(client_tracing_id), 581 client_tracing_id_(client_tracing_id),
581 task_runner_(task_runner), 582 task_runner_(task_runner),
582 io_task_runner_(io_task_runner), 583 io_task_runner_(io_task_runner),
583 share_group_(share_group), 584 share_group_(share_group),
584 mailbox_manager_(mailbox_manager), 585 mailbox_manager_(mailbox_manager),
585 watchdog_(watchdog), 586 watchdog_(watchdog),
587 discardable_manager_(std::move(discardable_manager)),
586 is_gpu_host_(is_gpu_host), 588 is_gpu_host_(is_gpu_host),
587 weak_factory_(this) { 589 weak_factory_(this) {
588 DCHECK(gpu_channel_manager); 590 DCHECK(gpu_channel_manager);
589 DCHECK(client_id); 591 DCHECK(client_id);
592 CHECK(discardable_manager_);
590 593
591 message_queue_ = new GpuChannelMessageQueue(this, task_runner, io_task_runner, 594 message_queue_ = new GpuChannelMessageQueue(this, task_runner, io_task_runner,
592 preempting_flag, preempted_flag, 595 preempting_flag, preempted_flag,
593 sync_point_manager); 596 sync_point_manager);
594 597
595 filter_ = new GpuChannelMessageFilter(this, message_queue_, task_runner); 598 filter_ = new GpuChannelMessageFilter(this, message_queue_, task_runner);
596 } 599 }
597 600
598 GpuChannel::~GpuChannel() { 601 GpuChannel::~GpuChannel() {
599 // Clear stubs first because of dependencies. 602 // Clear stubs first because of dependencies.
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 949
947 return manager->gpu_memory_buffer_factory() 950 return manager->gpu_memory_buffer_factory()
948 ->AsImageFactory() 951 ->AsImageFactory()
949 ->CreateImageForGpuMemoryBuffer(handle, size, format, internalformat, 952 ->CreateImageForGpuMemoryBuffer(handle, size, format, internalformat,
950 client_id_, surface_handle); 953 client_id_, surface_handle);
951 } 954 }
952 } 955 }
953 } 956 }
954 957
955 } // namespace gpu 958 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_channel.h ('k') | gpu/ipc/service/gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698