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

Side by Side Diff: gpu/command_buffer/client/context_support.h

Issue 2257533006: Free worker context resources on idle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix-cleanup2
Patch Set: rebase Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ 5 #ifndef GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_
6 #define GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ 6 #define GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // Sets a callback to be run when an error occurs. 52 // Sets a callback to be run when an error occurs.
53 virtual void SetErrorMessageCallback( 53 virtual void SetErrorMessageCallback(
54 const base::Callback<void(const char*, int32_t)>& callback) = 0; 54 const base::Callback<void(const char*, int32_t)>& callback) = 0;
55 55
56 class ScopedVisibility {}; 56 class ScopedVisibility {};
57 virtual std::unique_ptr<ScopedVisibility> ClientBecameVisible() = 0; 57 virtual std::unique_ptr<ScopedVisibility> ClientBecameVisible() = 0;
58 virtual void ClientBecameNotVisible( 58 virtual void ClientBecameNotVisible(
59 std::unique_ptr<ScopedVisibility> visibility) = 0; 59 std::unique_ptr<ScopedVisibility> visibility) = 0;
60 virtual bool AnyClientsVisible() const = 0; 60 virtual bool AnyClientsVisible() const = 0;
61 61
62 class ScopedBusy {};
63 virtual std::unique_ptr<ScopedBusy> ClientBecameBusy() = 0;
64 virtual void ClientBecameNotBusy(std::unique_ptr<ScopedBusy> busy) = 0;
65
66 // A callback which will be invoked when the context is considered idle.
67 virtual void SetIdleCallback(const base::Closure& callback) = 0;
68
62 protected: 69 protected:
63 ContextSupport() {} 70 ContextSupport() {}
64 virtual ~ContextSupport() {} 71 virtual ~ContextSupport() {}
65 }; 72 };
66 73
67 } 74 }
68 75
69 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ 76 #endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698