| Index: components/viz/client/local_surface_id_provider.h
|
| diff --git a/components/viz/client/local_surface_id_provider.h b/components/viz/client/local_surface_id_provider.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..50f4dd2e77d0658f25002c40f7a62fc09d728a69
|
| --- /dev/null
|
| +++ b/components/viz/client/local_surface_id_provider.h
|
| @@ -0,0 +1,48 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_VIZ_CLIENT_LOCAL_SURFACE_ID_PROVIDER_H_
|
| +#define COMPONENTS_VIZ_CLIENT_LOCAL_SURFACE_ID_PROVIDER_H_
|
| +
|
| +#include "cc/surfaces/local_surface_id.h"
|
| +#include "cc/surfaces/local_surface_id_allocator.h"
|
| +#include "ui/gfx/geometry/size.h"
|
| +
|
| +namespace cc {
|
| +class CompositorFrame;
|
| +}
|
| +
|
| +namespace viz {
|
| +
|
| +class LocalSurfaceIdProvider {
|
| + public:
|
| + LocalSurfaceIdProvider();
|
| + virtual ~LocalSurfaceIdProvider();
|
| +
|
| + virtual const cc::LocalSurfaceId& GetLocalSurfaceIdForFrame(
|
| + const cc::CompositorFrame& frame) = 0;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(LocalSurfaceIdProvider);
|
| +};
|
| +
|
| +class DefaultLocalSurfaceIdProvider : public LocalSurfaceIdProvider {
|
| + public:
|
| + DefaultLocalSurfaceIdProvider();
|
| +
|
| + const cc::LocalSurfaceId& GetLocalSurfaceIdForFrame(
|
| + const cc::CompositorFrame& frame) override;
|
| +
|
| + private:
|
| + cc::LocalSurfaceId local_surface_id_;
|
| + gfx::Size surface_size_;
|
| + float device_scale_factor_ = 0;
|
| + cc::LocalSurfaceIdAllocator local_surface_id_allocator_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DefaultLocalSurfaceIdProvider);
|
| +};
|
| +
|
| +} // namespace viz
|
| +
|
| +#endif // COMPONENTS_VIZ_CLIENT_LOCAL_SURFACE_ID_PROVIDER_H_
|
|
|