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

Side by Side Diff: platform_tools/android/visualbench/src/com/skia/VisualBenchActivity.java

Issue 1164403002: Visual bench on native android (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tiny cleanup Created 5 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
« no previous file with comments | « platform_tools/android/visualbench/project.properties ('k') | src/views/SkWindow.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 package com.skia;
9
10 import android.app.Activity;
11 import android.content.Intent;
12 import android.os.Bundle;
13 import android.provider.Settings;
14 import android.util.Log;
15 import android.view.View;
16 import android.view.WindowManager;
17
18 public class VisualBenchActivity extends android.app.NativeActivity {
19 static {
20 System.loadLibrary("skia_android");
21 }
22
23 @Override
24 public void onCreate(Bundle savedInstanceState)
25 {
26 super.onCreate(savedInstanceState);
27 }
28
29 @Override
30 public void onWindowFocusChanged(boolean hasFocus) {
31 super.onWindowFocusChanged(hasFocus);
32 if (!hasFocus) {
33 return;
34 }
35 getWindow().getDecorView().setSystemUiVisibility(
36 View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | // hide nav bar
37 View.SYSTEM_UI_FLAG_FULLSCREEN |// hide status bar
38 View.SYSTEM_UI_FLAG_IMMERSIVE);
39
40 // Disable backlight to keep the system as cool as possible
41 // TODO make this configurable
42 Settings.System.putInt(getContentResolver(),
43 Settings.System.SCREEN_BRIGHTNESS_MODE,
44 Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
45
46 WindowManager.LayoutParams lp = getWindow().getAttributes();
47 lp.screenBrightness = 0; // 0f - no backlight
48 getWindow().setAttributes(lp);
49 }
50 }
OLDNEW
« no previous file with comments | « platform_tools/android/visualbench/project.properties ('k') | src/views/SkWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698