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

Unified Diff: gpu/ipc/in_process_command_buffer.cc

Issue 2814583002: Service/ClientDiscardableManager (Closed)
Patch Set: rebase Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/in_process_command_buffer.h ('k') | gpu/ipc/service/gpu_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/in_process_command_buffer.cc
diff --git a/gpu/ipc/in_process_command_buffer.cc b/gpu/ipc/in_process_command_buffer.cc
index c3399559dfbcc0f6bd91d832e92c5053814f76fe..73c720a673769fe79f8fd148a8ac4e461b399a1c 100644
--- a/gpu/ipc/in_process_command_buffer.cc
+++ b/gpu/ipc/in_process_command_buffer.cc
@@ -38,6 +38,7 @@
#include "gpu/command_buffer/service/memory_program_cache.h"
#include "gpu/command_buffer/service/memory_tracking.h"
#include "gpu/command_buffer/service/query_manager.h"
+#include "gpu/command_buffer/service/service_discardable_manager.h"
#include "gpu/command_buffer/service/service_utils.h"
#include "gpu/command_buffer/service/sync_point_manager.h"
#include "gpu/command_buffer/service/transfer_buffer_manager.h"
@@ -178,6 +179,14 @@ gpu::gles2::ProgramCache* InProcessCommandBuffer::Service::program_cache() {
return program_cache_.get();
}
+ServiceDiscardableManager*
+InProcessCommandBuffer::Service::discardable_manager() {
+ if (!discardable_manager_) {
+ discardable_manager_.reset(new ServiceDiscardableManager());
+ }
+ return discardable_manager_.get();
+}
+
InProcessCommandBuffer::InProcessCommandBuffer(
const scoped_refptr<Service>& service)
: command_buffer_id_(CommandBufferId::FromUnsafeValue(
@@ -312,7 +321,8 @@ bool InProcessCommandBuffer::InitializeOnGpuThread(
service_->gpu_preferences(), service_->mailbox_manager(), NULL,
service_->shader_translator_cache(),
service_->framebuffer_completeness_cache(), feature_info,
- bind_generates_resource, nullptr, nullptr, GpuFeatureInfo());
+ bind_generates_resource, nullptr, nullptr, GpuFeatureInfo(),
+ service_->discardable_manager());
decoder_.reset(gles2::GLES2Decoder::Create(context_group_.get()));
« no previous file with comments | « gpu/ipc/in_process_command_buffer.h ('k') | gpu/ipc/service/gpu_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698