chromium/components/viz/service/display/resource_fence.h

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_VIZ_SERVICE_DISPLAY_RESOURCE_FENCE_H_
#define COMPONENTS_VIZ_SERVICE_DISPLAY_RESOURCE_FENCE_H_

#include "base/memory/ref_counted.h"

#include "base/memory/weak_ptr.h"
#include "components/viz/common/resources/resource_id.h"
#include "components/viz/service/viz_service_export.h"
#include "ui/gfx/gpu_fence_handle.h"

namespace viz {

class DisplayResourceProvider;

// An abstract interface used to ensure reading from resources passed between
// client and service does not happen before writing is completed.
// Instances of this class are accessed from the display compositor thread.
class VIZ_SERVICE_EXPORT ResourceFence
    : public base::RefCounted<ResourceFence> {};

}  // namespace viz

#endif  // COMPONENTS_VIZ_SERVICE_DISPLAY_RESOURCE_FENCE_H_