Skip to content

Commit

Permalink
gpu: Don't do resource purging if the context is lost.
Browse files Browse the repository at this point in the history
R=zmo@chromium.org

Bug: 1050220
Change-Id: I50dab36fbf02f228e2660e64982b2f188676d325
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2045203
Auto-Submit: Khushal <khushalsagar@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#740059}
  • Loading branch information
khushalsagar authored and Commit Bot committed Feb 11, 2020
1 parent e2beb40 commit 4d3a3d4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gpu/command_buffer/service/shared_context_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,8 @@ void SharedContextState::PurgeMemory(
}

// Ensure the context is current before doing any GPU cleanup.
MakeCurrent(nullptr);
if (!MakeCurrent(nullptr))
return;

switch (memory_pressure_level) {
case base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE:
Expand Down

0 comments on commit 4d3a3d4

Please sign in to comment.