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

Unified Diff: gpu/ipc/in_process_command_buffer.cc

Issue 2814583002: Service/ClientDiscardableManager (Closed)
Patch Set: Feedback 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
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 cba5695f324e095d952efe8fca8ff2d011c89b13..58848464ad6fab8efa3f47308a75bddcc6085b6c 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(
@@ -315,7 +324,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()));

Powered by Google App Engine
This is Rietveld 408576698