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

Side by Side Diff: blimp/client/app/android/blimp_compositor_manager_android.h

Issue 2274323002: Expose Blimp dependencies to the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@khushal_baseline_1
Patch Set: Created 4 years, 3 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 2015 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 BLIMP_CLIENT_APP_ANDROID_BLIMP_COMPOSITOR_MANAGER_ANDROID_H_
6 #define BLIMP_CLIENT_APP_ANDROID_BLIMP_COMPOSITOR_MANAGER_ANDROID_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/macros.h"
10 #include "blimp/client/feature/compositor/blimp_compositor_manager.h"
11 #include "ui/gfx/geometry/size.h"
12 #include "ui/gfx/native_widget_types.h"
13
14 namespace base {
15 class SingleThreadTaskRunner;
16 class Thread;
17 }
18
19 namespace cc {
20 class LayerTreeHost;
21 }
22
23 namespace blimp {
24 namespace client {
25
26 class RenderWidgetFeature;
27
28 // An Android specific version of the BlimpCompositor. This class builds a
29 // gfx::AcceleratedWidget out of an Android SurfaceView's surface.
30 class BlimpCompositorManagerAndroid : public BlimpCompositorManager {
Khushal 2016/08/24 23:22:45 Yes, die file die!! :D
David Trainor- moved to gerrit 2016/08/26 17:15:53 Acknowledged.
31 public:
32 // |real_size| is the total display area including system decorations (see
33 // android.view.Display.getRealSize()). |size| is the total display
34 // area not including system decorations (see android.view.Display.getSize()).
35 static std::unique_ptr<BlimpCompositorManagerAndroid> Create(
36 const gfx::Size& real_size,
37 const gfx::Size& size,
38 RenderWidgetFeature* render_widget_feature,
39 cc::SurfaceManager* surface_manager,
40 BlimpGpuMemoryBufferManager* gpu_memory_buffer_manager,
41 SurfaceIdAllocationCallback callback);
42
43 ~BlimpCompositorManagerAndroid() override;
44
45 protected:
46 // |size| is the size of the display. |real_size_supported| determines
47 // whether or not this size is the real display size or the display size
48 // not including the system decorations.
49 BlimpCompositorManagerAndroid(
50 const gfx::Size& size,
51 bool real_size_supported,
52 RenderWidgetFeature* render_widget_feature,
53 cc::SurfaceManager* surface_manager,
54 BlimpGpuMemoryBufferManager* gpu_memory_buffer_manager,
55 SurfaceIdAllocationCallback callback);
56
57 // BlimpCompositor implementation.
58 void GenerateLayerTreeSettings(cc::LayerTreeSettings* settings) override;
59
60 private:
61 // Used to determine tile size for the compositor's rastered tiles. For a
62 // device of width X height |portrait_width_| will be min(width, height) and
63 // |landscape_width_| will be max(width, height).
64 int portrait_width_;
65 int landscape_width_;
66
67 // True if the |portrait_width_| and |landscape_width_| represent the device's
68 // physical dimensions, including any area occupied by system decorations.
69 bool real_size_supported_;
70
71 DISALLOW_COPY_AND_ASSIGN(BlimpCompositorManagerAndroid);
72 };
73
74 } // namespace client
75 } // namespace blimp
76
77 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_COMPOSITOR_MANAGER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698