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

Unified Diff: gpu/command_buffer/client/gles2_implementation.h

Issue 2252163003: Update Context Client Visibility to use Scoped Pattern (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix webview Created 4 years, 4 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/command_buffer/client/context_support.h ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.h
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
index 48e5dbf8d3a55ec80c76f1093b32b1d64779eb4c..a34f6ce5ae731cdf78000f799bf6c173a1c53eb5 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -206,7 +206,9 @@ class GLES2_IMPL_EXPORT GLES2Implementation
uint64_t ShareGroupTracingGUID() const override;
void SetErrorMessageCallback(
const base::Callback<void(const char*, int32_t)>& callback) override;
- void SetClientVisible(int client_id, bool is_visible) override;
+ std::unique_ptr<ScopedVisibility> ClientBecameVisible() override;
+ void ClientBecameNotVisible(
+ std::unique_ptr<ScopedVisibility> visibility) override;
bool AnyClientsVisible() const override;
// TODO(danakj): Move to ContextSupport once ContextProvider doesn't need to
@@ -258,7 +260,7 @@ class GLES2_IMPL_EXPORT GLES2Implementation
void SignalSyncToken(const gpu::SyncToken& sync_token,
const base::Closure& callback) override;
void SignalQuery(uint32_t query, const base::Closure& callback) override;
- void SetAggressivelyFreeResources(bool aggressively_free_resources) override;
+ void TrimResources() override;
// base::trace_event::MemoryDumpProvider implementation.
bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
@@ -828,10 +830,9 @@ class GLES2_IMPL_EXPORT GLES2Implementation
// Flag to indicate whether the implementation can retain resources, or
// whether it should aggressively free them.
- bool aggressively_free_resources_;
+ bool aggressively_free_resources_ = false;
- // The set of IDs of all visible clients.
- std::set<int> visible_clients_;
+ uint32_t num_visible_clients_ = 0;
// Result of last GetString(GL_EXTENSIONS), used to keep
// GetString(GL_EXTENSIONS), GetStringi(GL_EXTENSIONS, index) and
« no previous file with comments | « gpu/command_buffer/client/context_support.h ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698