context_support.h revision 1e9bf3e0803691d0a228da41fc608347b6db4340
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 3// found in the LICENSE file. 4 5#ifndef GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ 6#define GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ 7 8#include "base/callback.h" 9 10namespace gpu { 11struct ManagedMemoryStats; 12 13class ContextSupport { 14 public: 15 // Runs |callback| when a sync point is reached. 16 virtual void SignalSyncPoint(uint32 sync_point, 17 const base::Closure& callback) = 0; 18 19 // Runs |callback| when a query created via glCreateQueryEXT() has cleared 20 // passed the glEndQueryEXT() point. 21 virtual void SignalQuery(uint32 query, const base::Closure& callback) = 0; 22 23 virtual void SendManagedMemoryStats(const ManagedMemoryStats& stats) = 0; 24 25 protected: 26 ContextSupport() {} 27 virtual ~ContextSupport() {} 28}; 29 30} 31 32#endif // GPU_COMMAND_BUFFER_CLIENT_CONTEXT_SUPPORT_H_ 33