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

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

Issue 1925863003: Changed Blimp client to start with white screen before drawing contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge origin/master Created 4 years, 7 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
« no previous file with comments | « no previous file | blimp/client/app/android/blimp_compositor_manager_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BLIMP_CLIENT_APP_ANDROID_BLIMP_COMPOSITOR_MANAGER_ANDROID_H_ 5 #ifndef BLIMP_CLIENT_APP_ANDROID_BLIMP_COMPOSITOR_MANAGER_ANDROID_H_
6 #define BLIMP_CLIENT_APP_ANDROID_BLIMP_COMPOSITOR_MANAGER_ANDROID_H_ 6 #define BLIMP_CLIENT_APP_ANDROID_BLIMP_COMPOSITOR_MANAGER_ANDROID_H_
7 7
8 #include "base/android/jni_android.h" 8 #include "base/android/jni_android.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "blimp/client/feature/compositor/blimp_compositor_manager.h" 10 #include "blimp/client/feature/compositor/blimp_compositor_manager.h"
(...skipping 17 matching lines...) Expand all
28 // An Android specific version of the BlimpCompositor. This class builds a 28 // An Android specific version of the BlimpCompositor. This class builds a
29 // gfx::AcceleratedWidget out of an Android SurfaceView's surface. 29 // gfx::AcceleratedWidget out of an Android SurfaceView's surface.
30 class BlimpCompositorManagerAndroid : public BlimpCompositorManager { 30 class BlimpCompositorManagerAndroid : public BlimpCompositorManager {
31 public: 31 public:
32 // |real_size| is the total display area including system decorations (see 32 // |real_size| is the total display area including system decorations (see
33 // android.view.Display.getRealSize()). |size| is the total display 33 // android.view.Display.getRealSize()). |size| is the total display
34 // area not including system decorations (see android.view.Display.getSize()). 34 // area not including system decorations (see android.view.Display.getSize()).
35 static std::unique_ptr<BlimpCompositorManagerAndroid> Create( 35 static std::unique_ptr<BlimpCompositorManagerAndroid> Create(
36 const gfx::Size& real_size, 36 const gfx::Size& real_size,
37 const gfx::Size& size, 37 const gfx::Size& size,
38 RenderWidgetFeature* render_widget_feature); 38 RenderWidgetFeature* render_widget_feature,
39 BlimpCompositorManagerClient* client);
39 40
40 ~BlimpCompositorManagerAndroid() override; 41 ~BlimpCompositorManagerAndroid() override;
41 42
42 protected: 43 protected:
43 // |size| is the size of the display. |real_size_supported| determines 44 // |size| is the size of the display. |real_size_supported| determines
44 // whether or not this size is the real display size or the display size 45 // whether or not this size is the real display size or the display size
45 // not including the system decorations. |dp_to_px| is the scale factor that 46 // not including the system decorations. |dp_to_px| is the scale factor that
46 // is required to convert from dp (device pixels) to px. 47 // is required to convert from dp (device pixels) to px.
47 BlimpCompositorManagerAndroid(const gfx::Size& size, 48 BlimpCompositorManagerAndroid(const gfx::Size& size,
48 bool real_size_supported, 49 bool real_size_supported,
49 RenderWidgetFeature* render_widget_feature); 50 RenderWidgetFeature* render_widget_feature,
51 BlimpCompositorManagerClient* client);
50 52
51 // BlimpCompositor implementation. 53 // BlimpCompositor implementation.
52 void GenerateLayerTreeSettings(cc::LayerTreeSettings* settings) override; 54 void GenerateLayerTreeSettings(cc::LayerTreeSettings* settings) override;
53 55
54 private: 56 private:
55 // Used to determine tile size for the compositor's rastered tiles. For a 57 // Used to determine tile size for the compositor's rastered tiles. For a
56 // device of width X height |portrait_width_| will be min(width, height) and 58 // device of width X height |portrait_width_| will be min(width, height) and
57 // |landscape_width_| will be max(width, height). 59 // |landscape_width_| will be max(width, height).
58 int portrait_width_; 60 int portrait_width_;
59 int landscape_width_; 61 int landscape_width_;
60 62
61 // True if the |portrait_width_| and |landscape_width_| represent the device's 63 // True if the |portrait_width_| and |landscape_width_| represent the device's
62 // physical dimensions, including any area occupied by system decorations. 64 // physical dimensions, including any area occupied by system decorations.
63 bool real_size_supported_; 65 bool real_size_supported_;
64 66
65 DISALLOW_COPY_AND_ASSIGN(BlimpCompositorManagerAndroid); 67 DISALLOW_COPY_AND_ASSIGN(BlimpCompositorManagerAndroid);
66 }; 68 };
67 69
68 } // namespace client 70 } // namespace client
69 } // namespace blimp 71 } // namespace blimp
70 72
71 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_COMPOSITOR_MANAGER_ANDROID_H_ 73 #endif // BLIMP_CLIENT_APP_ANDROID_BLIMP_COMPOSITOR_MANAGER_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | blimp/client/app/android/blimp_compositor_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698