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

Unified Diff: cc/test/test_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
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/test/test_context_support.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_context_support.h
diff --git a/cc/test/test_context_support.h b/cc/test/test_context_support.h
index f2b58d641e98038a0e0f71c444d97882bc151558..6d162001063e1f10392039f26e1ab93dd5346af4 100644
--- a/cc/test/test_context_support.h
+++ b/cc/test/test_context_support.h
@@ -30,7 +30,7 @@ class TestContextSupport : public gpu::ContextSupport {
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;
void Swap() override;
void PartialSwapBuffers(const gfx::Rect& sub_buffer) override;
void CommitOverlayPlanes() override;
@@ -42,7 +42,9 @@ class TestContextSupport : public gpu::ContextSupport {
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;
void CallAllSyncPointCallbacks();
@@ -65,8 +67,8 @@ class TestContextSupport : public gpu::ContextSupport {
private:
std::vector<base::Closure> sync_point_callbacks_;
ScheduleOverlayPlaneCallback schedule_overlay_plane_callback_;
- bool out_of_order_callbacks_;
- std::set<int> visible_clients_;
+ bool out_of_order_callbacks_ = false;
+ uint32_t num_visible_clients_ = 0;
base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_;
« no previous file with comments | « cc/output/gl_renderer_unittest.cc ('k') | cc/test/test_context_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698