aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Song2017-06-12 18:08:33 -0500
committerElliott Hughes2017-06-16 17:33:02 -0500
commite2bd876043c3f26ad4712c2aad62b320368ad815 (patch)
tree7290ac89542e3b13e182836b28c694fee1e58a81 /vr_ui.h
parentffd8505f4ddc4e94416f36cd0b425040c8e566b8 (diff)
downloadplatform-bootable-recovery-e2bd876043c3f26ad4712c2aad62b320368ad815.tar.gz
platform-bootable-recovery-e2bd876043c3f26ad4712c2aad62b320368ad815.tar.xz
platform-bootable-recovery-e2bd876043c3f26ad4712c2aad62b320368ad815.zip
Introduce VR recovery ui
A version of screen ui with specific adjustments for vr device compatibility. (cherrypick of a44dba7f4e7296077f65fd571232e8a61aed9418 to AOSP) Bug: 37779982 Test: "adb reboot recovery" to view Change-Id: If6b0f26c1b587f8d0176060685b5efb6c67593b1
Diffstat (limited to 'vr_ui.h')
-rw-r--r--vr_ui.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/vr_ui.h b/vr_ui.h
new file mode 100644
index 00000000..85c57081
--- /dev/null
+++ b/vr_ui.h
@@ -0,0 +1,38 @@
1/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef RECOVERY_VR_UI_H
18#define RECOVERY_VR_UI_H
19
20#include "screen_ui.h"
21
22class VrRecoveryUI : public ScreenRecoveryUI {
23 public:
24 VrRecoveryUI();
25
26 protected:
27 // Pixel offsets to move drawing functions to visible range.
28 // Can vary per device depending on screen size and lens distortion.
29 int x_offset, y_offset, stereo_offset;
30
31 bool InitTextParams() override;
32
33 void DrawHorizontalRule(int* y) override;
34 void DrawHighlightBar(int x, int y, int width, int height) const override;
35 void DrawTextLine(int x, int* y, const char* line, bool bold) const override;
36};
37
38#endif // RECOVERY_VR_UI_H