| 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 virtual const cc::LocalSurfaceId& GetLocalSurfaceIdForFrame( |
| 21 const cc::CompositorFrame& frame) = 0; |
| 22 }; |
| 23 |
| 24 class DefaultLocalSurfaceIdProvider : public LocalSurfaceIdProvider { |
| 25 public: |
| 26 const cc::LocalSurfaceId& GetLocalSurfaceIdForFrame( |
| 27 const cc::CompositorFrame& frame) override; |
| 28 |
| 29 private: |
| 30 cc::LocalSurfaceId local_surface_id_; |
| 31 gfx::Size surface_size_; |
| 32 float device_scale_factor_ = 0; |
| 33 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; |
| 34 }; |
| 35 |
| 36 } // namespace viz |
| 37 |
| 38 #endif // COMPONENTS_VIZ_CLIENT_LOCAL_SURFACE_ID_PROVIDER_H_ |
| OLD | NEW |