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

Unified Diff: gpu/command_buffer/client/context_support.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
Index: gpu/command_buffer/client/context_support.h
diff --git a/gpu/command_buffer/client/context_support.h b/gpu/command_buffer/client/context_support.h
index 99e94045326adf8b4abcd2acd1570f085789ee9d..543025d81045b94737446e3bd0c8b457a511f2f1 100644
--- a/gpu/command_buffer/client/context_support.h
+++ b/gpu/command_buffer/client/context_support.h
@@ -29,11 +29,8 @@ class ContextSupport {
// passed the glEndQueryEXT() point.
virtual void SignalQuery(uint32_t query, const base::Closure& callback) = 0;
- // Indicates whether the context should aggressively free allocated resources.
- // If set to true, the context will purge all temporary resources when
- // flushed.
- virtual void SetAggressivelyFreeResources(
- bool aggressively_free_resources) = 0;
+ // Causes ContextSupport to trim allocated resources, reducing memory usage.
+ virtual void TrimResources() = 0;
virtual void Swap() = 0;
virtual void PartialSwapBuffers(const gfx::Rect& sub_buffer) = 0;
@@ -56,8 +53,10 @@ class ContextSupport {
virtual void SetErrorMessageCallback(
const base::Callback<void(const char*, int32_t)>& callback) = 0;
- // Called when a client of the context has changed visibility.
- virtual void SetClientVisible(int client_id, bool is_visible) = 0;
+ class ScopedVisibility {};
+ virtual std::unique_ptr<ScopedVisibility> ClientBecameVisible() = 0;
+ virtual void ClientBecameNotVisible(
+ std::unique_ptr<ScopedVisibility> visibility) = 0;
virtual bool AnyClientsVisible() const = 0;
protected:
« no previous file with comments | « content/renderer/android/synchronous_compositor_output_surface.cc ('k') | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698