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

Side by Side Diff: blimp/client/compositor/blimp_compositor_android.h

Issue 1295243003: Initial commit of the blimp/ folder and target (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Some cleanup nits. Created 5 years, 4 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_ANDROID_COMPOSITOR_BLIMP_COMPOSITOR_ANDROID_H_
6 #define BLIMP_CLIENT_ANDROID_COMPOSITOR_BLIMP_COMPOSITOR_ANDROID_H_
7
8 #include "base/android/jni_android.h"
9 #include "base/macros.h"
10 #include "blimp/client/compositor/blimp_compositor.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
25 // An Android specific version of the BlimpCompositor. This class builds a
26 // gfx::AcceleratedWidget out of an Android SurfaceView's surface.
27 class BlimpCompositorAndroid : public BlimpCompositor {
28 public:
29 static scoped_ptr<BlimpCompositorAndroid> Create(
30 const gfx::Size& physical_size,
31 const gfx::Size& display_size,
32 float device_scale_factor);
Wez 2015/08/27 02:01:52 nit: Comment to explain the parameters
David Trainor- moved to gerrit 2015/08/28 01:23:47 Done.
33
34 ~BlimpCompositorAndroid() override;
35
36 void SetSurface(JNIEnv* env, jobject jsurface);
Wez 2015/08/27 02:01:52 nit: Comment to explain e.g. ownership semantics f
David Trainor- moved to gerrit 2015/08/28 01:23:47 Done. I do jsurface because it's a Java object.
Wez 2015/09/03 00:49:27 Acknowledged.
37
38 protected:
39 BlimpCompositorAndroid(const gfx::Size& device_size,
40 bool real_size_supported,
41 float device_scale_factor);
Wez 2015/08/27 02:01:52 nit: Comment parameters?
David Trainor- moved to gerrit 2015/08/28 01:23:47 Done.
42
43 // BlimpCompositor Implementation --------------------------------------------
44 gfx::AcceleratedWidget GetWindow() override;
45 void GenerateLayerTreeSettings(cc::LayerTreeSettings& settings,
46 const base::CommandLine& cmd) override;
47
48 private:
49 int portrait_width_;
50 int landscape_width_;
51 bool real_size_supported_;
Wez 2015/08/27 02:01:52 nit: Comments on members' usage?
David Trainor- moved to gerrit 2015/08/28 01:23:47 Done.
52
53 gfx::AcceleratedWidget window_;
Wez 2015/08/27 02:01:52 nit: Initialize in-line?
David Trainor- moved to gerrit 2015/08/28 01:23:47 Still would prefer all constructor initialization,
Wez 2015/09/03 00:49:27 Acknowledged.
54
55 DISALLOW_COPY_AND_ASSIGN(BlimpCompositorAndroid);
56 };
57
58 } // namespace blimp
59
60 #endif // BLIMP_CLIENT_ANDROID_COMPOSITOR_BLIMP_COMPOSITOR_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698