hwc: vd: Add support for Dynamic Resolution Change (DRC)
1. Add support for Dynamic Resolution Change
We add support for DRC on virtual displays. This is achieved
by reading the width and height attributes that are set as
part of the buffer handle metadata.
For the WFD use cases, the WFD MultiMedia framework will
update the width and height during DRC by using setMetaData
API with UPDATE_BUFFER_GEOMETRY. We then proceed to configure
WB with the new resolution for subsequent frames.
2. Update WB dump with output buffer format and resolution
Update WB dump with output buffer format and resolution. This is
helpful for debugging purposes.
Change-Id: I537277499041bffc7bfc5c6e3d024b67f80fce44
diff --git a/libhwcomposer/hwc_virtual.h b/libhwcomposer/hwc_virtual.h
index 5ca99f7..525ae2a 100644
--- a/libhwcomposer/hwc_virtual.h
+++ b/libhwcomposer/hwc_virtual.h
@@ -45,12 +45,21 @@
hwc_display_contents_1_t** displays);
void pause(hwc_context_t* ctx, int dpy);
void resume(hwc_context_t* ctx, int dpy);
+ int getScalingHeight() const { return mScalingHeight; };
+ int getScalingWidth() const { return mScalingWidth; };
// We can dump the frame buffer and WB
// output buffer by dynamically enabling
// dumping via a binder call:
// adb shell service call display.qservice 15 i32 3 i32 1
static bool sVDDumpEnabled;
static void dynamicDebug(bool enable) {sVDDumpEnabled = enable;};
+
+private:
+ // These variables store the resolution that WB is being configured to
+ // in the current draw cycle.
+ int mScalingWidth, mScalingHeight;
+ void setMDPScalingMode(hwc_context_t* ctx,
+ private_handle_t* ohnd, int dpy);
};
}; //namespace