Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

1package com.genymobile.scrcpy.device;
2
3public final class DisplayInfo {
4 private final int displayId;
5 private final Size size;
6 private final int rotation;
7 private final int layerStack;
8 private final int flags;
9
10 public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 0x00000001;
11
12 public DisplayInfo(int displayId, Size size, int rotation, int layerStack, int flags) {
13 this.displayId = displayId;
14 this.size = size;
15 this.rotation = rotation;
16 this.layerStack = layerStack;
17 this.flags = flags;
18 }
19
20 public int getDisplayId() {
21 return displayId;
22 }
23
24 public Size getSize() {
…lines 25–32 unchanged (8 lines)
33 return layerStack;
34 }
35
36 public int getFlags() {
37 return flags;
38 }
39}
40
41

After

1package com.genymobile.scrcpy.device;
2
3public final class DisplayInfo {
4 private final int displayId;
5 private final Size size;
6 private final int rotation;
7 private final int layerStack;
8 private final int flags;
9 private final int dpi;
10
11 public static final int FLAG_SUPPORTS_PROTECTED_BUFFERS = 0x00000001;
12
13 public DisplayInfo(int displayId, Size size, int rotation, int layerStack, int flags, int dpi) {
14 this.displayId = displayId;
15 this.size = size;
16 this.rotation = rotation;
17 this.layerStack = layerStack;
18 this.flags = flags;
19 this.dpi = dpi;
20 }
21
22 public int getDisplayId() {
23 return displayId;
24 }
25
…lines 26–35 unchanged (10 lines)
36 }
37
38 public int getFlags() {
39 return flags;
40 }
41
42 public int getDpi() {
43 return dpi;
44 }
45}
46
47

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "device"
; ";"
class_declaration
modifiers
public "public"
final "final"
class "class"
identifier "DisplayInfo"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "displayId"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Size"
variable_declarator
identifier "size"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "rotation"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "layerStack"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "flags"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_SUPPORTS_PROTECTED_BUFFERS"
= "="
hex_integer_literal "0x00000001"
; ";"
constructor_declaration
modifiers
public "public"
identifier "DisplayInfo"
formal_parameters
( "("
formal_parameter
integral_type
int "int"
identifier "displayId"
, ","
formal_parameter
type_identifier "Size"
identifier "size"
, ","
formal_parameter
integral_type
int "int"
identifier "rotation"
, ","
formal_parameter
integral_type
int "int"
identifier "layerStack"
, ","
formal_parameter
integral_type
int "int"
identifier "flags"
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "displayId"
= "="
identifier "displayId"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "size"
= "="
identifier "size"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "rotation"
= "="
identifier "rotation"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "layerStack"
= "="
identifier "layerStack"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "flags"
= "="
identifier "flags"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getDisplayId"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "displayId"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Size"
identifier "getSize"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "size"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getRotation"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "rotation"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getLayerStack"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "layerStack"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getFlags"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "flags"
; ";"
} "}"
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "genymobile"
. "."
identifier "scrcpy"
. "."
identifier "device"
; ";"
class_declaration
modifiers
public "public"
final "final"
class "class"
identifier "DisplayInfo"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "displayId"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "Size"
variable_declarator
identifier "size"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "rotation"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "layerStack"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "flags"
; ";"
field_declaration
modifiers
private "private"
final "final"
integral_type
int "int"
variable_declarator
identifier "dpi"
; ";"
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
int "int"
variable_declarator
identifier "FLAG_SUPPORTS_PROTECTED_BUFFERS"
= "="
hex_integer_literal "0x00000001"
; ";"
constructor_declaration
modifiers
public "public"
identifier "DisplayInfo"
formal_parameters
( "("
formal_parameter
integral_type
int "int"
identifier "displayId"
, ","
formal_parameter
type_identifier "Size"
identifier "size"
, ","
formal_parameter
integral_type
int "int"
identifier "rotation"
, ","
formal_parameter
integral_type
int "int"
identifier "layerStack"
, ","
formal_parameter
integral_type
int "int"
identifier "flags"
, ","
formal_parameter
integral_type
int "int"
identifier "dpi"
) ")"
constructor_body
{ "{"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "displayId"
= "="
identifier "displayId"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "size"
= "="
identifier "size"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "rotation"
= "="
identifier "rotation"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "layerStack"
= "="
identifier "layerStack"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "flags"
= "="
identifier "flags"
; ";"
expression_statement
assignment_expression
field_access
this "this"
. "."
identifier "dpi"
= "="
identifier "dpi"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getDisplayId"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "displayId"
; ";"
} "}"
method_declaration
modifiers
public "public"
type_identifier "Size"
identifier "getSize"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "size"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getRotation"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "rotation"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getLayerStack"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "layerStack"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getFlags"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "flags"
; ";"
} "}"
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getDpi"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "dpi"
; ";"
} "}"
} "}"