| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 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 COMPONENTS_VIZ_CLIENT_LOCAL_SURFACE_ID_PROVIDER_H_ |
| 6 #define COMPONENTS_VIZ_CLIENT_LOCAL_SURFACE_ID_PROVIDER_H_ |
| 7 |
| 8 #include "cc/surfaces/local_surface_id.h" |
| 9 #include "cc/surfaces/local_surface_id_allocator.h" |
| 10 #include "ui/gfx/geometry/size.h" |
| 11 |
| 12 namespace cc { |
| 13 class CompositorFrame; |
| 14 } |
| 15 |
| 16 namespace viz { |
| 17 |
| 18 class LocalSurfaceIdProvider { |
| 19 public: |
| 20 LocalSurfaceIdProvider(); |
| 21 virtual ~LocalSurfaceIdProvider(); |
| 22 |
| 23 virtual const cc::LocalSurfaceId& GetLocalSurfaceIdForFrame( |
| 24 const cc::CompositorFrame& frame) = 0; |
| 25 |
| 26 private: |
| 27 DISALLOW_COPY_AND_ASSIGN(LocalSurfaceIdProvider); |
| 28 }; |
| 29 |
| 30 class DefaultLocalSurfaceIdProvider : public LocalSurfaceIdProvider { |
| 31 public: |
| 32 DefaultLocalSurfaceIdProvider(); |
| 33 |
| 34 const cc::LocalSurfaceId& GetLocalSurfaceIdForFrame( |
| 35 const cc::CompositorFrame& frame) override; |
| 36 |
| 37 private: |
| 38 cc::LocalSurfaceId local_surface_id_; |
| 39 gfx::Size surface_size_; |
| 40 float device_scale_factor_ = 0; |
| 41 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(DefaultLocalSurfaceIdProvider); |
| 44 }; |
| 45 |
| 46 } // namespace viz |
| 47 |
| 48 #endif // COMPONENTS_VIZ_CLIENT_LOCAL_SURFACE_ID_PROVIDER_H_ |
| OLD | NEW |