summaryrefslogtreecommitdiff
path: root/libs/gui/LayerState.cpp
diff options
context:
space:
mode:
author Ady Abraham <adyabr@google.com> 2021-07-08 19:44:07 -0700
committer Ady Abraham <adyabr@google.com> 2021-07-09 10:30:23 -0700
commit6e8e36486152c3602c5ba3214f34fc01a6a13937 (patch)
tree794e9a73754cd603eee978c71111fae4ba7e9296 /libs/gui/LayerState.cpp
parentf0e85668ef360fec0eaac8e16c3fb8169c443f5c (diff)
SF: fix BufferTX counter for null buffers
Don't increment the BufferTX counter is the transaction includes a buffer change but that buffer is null. Test: Open https://jsfiddle.net/8q7nuwh9/show in Chrome and scroll up down Bug: 192352790 Change-Id: Ia0a27ff32fb20f20a1ac671f2b4fdb3ae22a8aea
Diffstat (limited to 'libs/gui/LayerState.cpp')
-rw-r--r--libs/gui/LayerState.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index e65c721ae1..2d99fc1903 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -562,6 +562,10 @@ bool layer_state_t::hasBufferChanges() const {
return (what & layer_state_t::eBufferChanged) || (what & layer_state_t::eCachedBufferChanged);
}
+bool layer_state_t::hasValidBuffer() const {
+ return buffer || cachedBuffer.isValid();
+}
+
status_t layer_state_t::matrix22_t::write(Parcel& output) const {
SAFE_PARCEL(output.writeFloat, dsdx);
SAFE_PARCEL(output.writeFloat, dtdx);