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

Side by Side Diff: components/viz/client/local_surface_id_provider.h

Issue 2923583002: Remove RendererCompositorFrameSink and use ClientCompositorFrameSink instead (Closed)
Patch Set: Fix windows Created 3 years, 6 months 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 unified diff | Download patch
OLDNEW
(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_
OLDNEW
« no previous file with comments | « components/viz/client/client_compositor_frame_sink.cc ('k') | components/viz/client/local_surface_id_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698