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

Unified Diff: gpu/command_buffer/tests/gl_manager.h

Issue 2383753002: gpu: Add GpuFence framework.
Patch Set: rebase Created 4 years, 1 month 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/tests/gl_manager.h
diff --git a/gpu/command_buffer/tests/gl_manager.h b/gpu/command_buffer/tests/gl_manager.h
index aa8a49acb0812f2316c17e770b2d937fdfa29b33..0639685b05b33702f4b70aaa9d152a7f033135f8 100644
--- a/gpu/command_buffer/tests/gl_manager.h
+++ b/gpu/command_buffer/tests/gl_manager.h
@@ -17,6 +17,7 @@
#include "gpu/command_buffer/service/feature_info.h"
#include "gpu/command_buffer/service/gpu_preferences.h"
#include "ui/gfx/geometry/size.h"
+#include "ui/gfx/gpu_fence.h"
#include "ui/gfx/gpu_memory_buffer.h"
namespace base {
@@ -35,6 +36,7 @@ namespace gpu {
class CommandBufferService;
class CommandExecutor;
+class FenceFactory;
class ImageFactory;
class SyncPointClient;
class SyncPointOrderData;
@@ -82,6 +84,8 @@ class GLManager : private GpuControl {
bool backbuffer_alpha;
// The ImageFactory to use to generate images for the backbuffer.
gpu::ImageFactory* image_factory;
+ // The FenceFactory to use to generate fences.
+ gpu::FenceFactory* fence_factory;
// Whether to preserve the backbuffer after a call to SwapBuffers().
bool preserve_backbuffer;
};
@@ -92,6 +96,8 @@ class GLManager : private GpuControl {
const gfx::Size& size,
gfx::BufferFormat format);
+ std::unique_ptr<gfx::GpuFence> CreateGpuFence();
+
void Initialize(const Options& options);
void InitializeWithCommandLine(const Options& options,
const base::CommandLine& command_line);
@@ -152,6 +158,8 @@ class GLManager : private GpuControl {
void SignalSyncToken(const gpu::SyncToken& sync_token,
const base::Closure& callback) override;
bool CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) override;
+ int32_t CreateFence(ClientFence fence) override;
+ void DestroyFence(int32_t id) override;
private:
void PumpCommands();

Powered by Google App Engine
This is Rietveld 408576698