jint bits_per_pixel,
jint bits_per_component,
jdouble dip_scale,
- jint smallest_dip_width) {
+ jint smallest_dip_width,
+ jint rotation_degrees) {
SharedDeviceDisplayInfo::GetInstance()->InvokeUpdate(env, obj,
display_height, display_width,
physical_display_height, physical_display_width,
bits_per_pixel, bits_per_component,
- dip_scale, smallest_dip_width);
+ dip_scale, smallest_dip_width, rotation_degrees);
}
// static
return smallest_dip_width_;
}
+int SharedDeviceDisplayInfo::GetRotationDegrees() {
+ base::AutoLock autolock(lock_);
+ return rotation_degrees_;
+}
+
// static
bool SharedDeviceDisplayInfo::RegisterSharedDeviceDisplayInfo(JNIEnv* env) {
return RegisterNativesImpl(env);
jint bits_per_pixel,
jint bits_per_component,
jdouble dip_scale,
- jint smallest_dip_width) {
+ jint smallest_dip_width,
+ jint rotation_degrees) {
base::AutoLock autolock(lock_);
UpdateDisplayInfo(env, obj,
display_height, display_width,
physical_display_height, physical_display_width,
bits_per_pixel, bits_per_component, dip_scale,
- smallest_dip_width);
+ smallest_dip_width, rotation_degrees);
}
SharedDeviceDisplayInfo::SharedDeviceDisplayInfo()
Java_DeviceDisplayInfo_getBitsPerPixel(env, j_device_info_.obj()),
Java_DeviceDisplayInfo_getBitsPerComponent(env, j_device_info_.obj()),
Java_DeviceDisplayInfo_getDIPScale(env, j_device_info_.obj()),
- Java_DeviceDisplayInfo_getSmallestDIPWidth(env, j_device_info_.obj()));
+ Java_DeviceDisplayInfo_getSmallestDIPWidth(env, j_device_info_.obj()),
+ Java_DeviceDisplayInfo_getRotationDegrees(env, j_device_info_.obj()));
}
SharedDeviceDisplayInfo::~SharedDeviceDisplayInfo() {
jint bits_per_pixel,
jint bits_per_component,
jdouble dip_scale,
- jint smallest_dip_width) {
+ jint smallest_dip_width,
+ jint rotation_degrees) {
display_height_ = static_cast<int>(display_height);
display_width_ = static_cast<int>(display_width);
physical_display_height_ = static_cast<int>(physical_display_height);
bits_per_component_ = static_cast<int>(bits_per_component);
dip_scale_ = static_cast<double>(dip_scale);
smallest_dip_width_ = static_cast<int>(smallest_dip_width);
+ rotation_degrees_ = static_cast<int>(rotation_degrees);
}
} // namespace gfx