Tell Your Graphics Stack That the Display Is Circular
Hongyu Miao Felix Xiaozhu Lin miaoh@purdue.edu xzl@purdue.edu
Tell Your Graphics Stack That the Display Is Circular Hongyu Miao - - PowerPoint PPT Presentation
Tell Your Graphics Stack That the Display Is Circular Hongyu Miao Felix Xiaozhu Lin miaoh@purdue.edu xzl@purdue.edu (1975) Text Display Rectangular 2 (1980s) RGB Color Display Rectangular 3 Modern Desktop: Rectangular
Hongyu Miao Felix Xiaozhu Lin miaoh@purdue.edu xzl@purdue.edu
2
3
4
5
6
7
Graphics Stack: Rectangular area
8
Graphics Stack: Rectangular area
9
Displayed: Circular area
Graphics Stack: Rectangular area
10
Invisible area: WASTED!
Displayed: Circular area Graphics Stack: Rectangular area
11
Shader
12
Shader
13
PhoneWindowsDe corView LinearLayout FrameLayout FrameLayout TextView Button TextView
Shader
Save DrawRenderNode DrawRenderNode DrawRect Display List
14
Shader
Save DrawRenderNode DrawRenderNode DrawRect Display List
glDisable(cap=GL_SCISSOR_TEST) glActiveTexture(texture=GL_TEX TURE0) glGenBuffer(n=1,buffer=[2]) glBindBuffer(target=GL_ARRAY_B UFFER,buffer=2) OpenGL Commands
15
Shader
16
Shader
17
2
Shader
18
2,3
Shader
19
2,3 4
Shader
20
2,3 4 5
Shader
21
2,3 4 5 6
Shader
22
2,3 4 5 6 6,7
Shader
Save DrawRenderNode DrawRenderNode DrawRect Display List
glDisable(cap=GL_SCISSOR_TEST) glActiveTexture(texture=GL_TEXTURE0) glGenBuffer(n=1,buffer=[2]) glBindBuffer(target=GL_ARRAY_BUFFER,buffer=2) OpenGl Commands
23
24
Texture is specified as a rectangular
25
26
27
28
29
Drawing Upload texture: 25ms Shader compile:8.2ms Shader link: 1.2ms Other: 2.4ms Rendering time: 4.5ms
31
32
33
34
35
Apps # of UI Views Drawing Time
Rdr. Time
Hidden Clipped Total Shader compile Shader link† Texture upload† Other cmds Google keep
8.6 1.3 4.4 2.9 4.3
Attopedia
9 10 8.2 1.2 25.0 2.4 4.5
Hole19
5 8 30.4 1.1 4.9 4.1 2.6
WearbottleSpinner
4 5 18.0 3.2 116.2 2.1 3.0
GridViewPager
6 9 23.9 4.4 2.0 2.0 2.8
Runtastic*
14 17
ReminderByTime*
13 14
Fit*
13 16
Weatherlive*
14 17
Instaweather*
13 16
Hangout*
13 16
36
37
38
Developer-controlled layout Tedious & not portable Complicated UI library Tens of thousands of SLoC to be changed
39
Developer-controlled layout Tedious & not portable Complicated UI library Tens of thousands of SLoC to be changed Cannot reduces wastes above this layer LPD [ATC15] Incomplete
40
(x0,y0) (x,y) r
void main() { if((x-x0)*(x-x0)+(y-y0)*(y-y0)<r*r){ //Render the pixel if in circular area gl_FragColor = \ texture2D(textureUnit, textureCoordinate); ... ... } }
Shader
41
Before Rewriting Shader After Rewriting Shader
42
Profiling data stream Benchmark app Mobile GPU Profiler
43
44
Profiling data stream Mobile GPU Profiler
Similar QCOM SoC Same-generation GPU
46
47
48
LPD [ATC15] Reduced DRAM-to-display traffic 7 MBps Saved power 2.7 mW Our method Reduced memory traffic 10 MBps Will save power 3.9 mW Our method (if novel display controller) Will reduce memory traffic 15 MBps Will save power 5.8 mW Assumption: Power saving roughly proportional to reduced traffic
49
50
51
52
53
54
55
56