Skip to content

Commit

Permalink
ContextGroup SharedImageRepresentationFactory has null memtracker
Browse files Browse the repository at this point in the history
unique_ptr has been moved and get() returns nullptr

Change-Id: I26460d92140941ec8d6627e77f4401bc19641966
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1948739
Commit-Queue: Kramer Ge <fangzhoug@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721176}
  • Loading branch information
fangzhoug authored and Commit Bot committed Dec 3, 2019
1 parent 5ddd065 commit 30c4d44
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gpu/command_buffer/service/context_group.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ ContextGroup::ContextGroup(
shared_image_representation_factory_(
std::make_unique<SharedImageRepresentationFactory>(
shared_image_manager,
memory_tracker.get())) {
memory_tracker_.get())) {
DCHECK(discardable_manager);
DCHECK(feature_info_);
DCHECK(mailbox_manager_);
Expand Down Expand Up @@ -621,8 +621,6 @@ void ContextGroup::Destroy(DecoderContext* decoder, bool have_context) {
ReportProgress();
}

memory_tracker_ = nullptr;

if (passthrough_discardable_manager_) {
passthrough_discardable_manager_->DeleteContextGroup(this);
}
Expand All @@ -633,6 +631,7 @@ void ContextGroup::Destroy(DecoderContext* decoder, bool have_context) {
passthrough_resources_.reset();
ReportProgress();
}
memory_tracker_ = nullptr;
}

uint32_t ContextGroup::GetMemRepresented() const {
Expand Down

0 comments on commit 30c4d44

Please sign in to comment.