[legacy layer cleanup] Crop and transform methods
Remove unused methods in legacy layer code.
Flag: EXEMPT flag removal
Bug: 330785038
Test: presubmit
Change-Id: I0c008ea8548ef18c86bd99280f9c1f202f656cc9
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index c17ea3b..6b51410 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -871,16 +871,6 @@
return true;
}
-bool Layer::setBufferCrop(const Rect& bufferCrop) {
- if (mDrawingState.bufferCrop == bufferCrop) return false;
-
- mDrawingState.sequence++;
- mDrawingState.bufferCrop = bufferCrop;
-
- setTransactionFlags(eTransactionNeeded);
- return true;
-}
-
void Layer::releasePreviousBuffer() {
mReleasePreviousBuffer = true;
if (!mBufferInfo.mBuffer ||
@@ -1568,25 +1558,6 @@
return mBufferInfo.mTransformToDisplayInverse;
}
-Rect Layer::getBufferCrop() const {
- // this is the crop rectangle that applies to the buffer
- // itself (as opposed to the window)
- if (!mBufferInfo.mCrop.isEmpty()) {
- // if the buffer crop is defined, we use that
- return mBufferInfo.mCrop;
- } else if (mBufferInfo.mBuffer != nullptr) {
- // otherwise we use the whole buffer
- return mBufferInfo.mBuffer->getBounds();
- } else {
- // if we don't have a buffer yet, we use an empty/invalid crop
- return Rect();
- }
-}
-
-uint32_t Layer::getBufferTransform() const {
- return mBufferInfo.mTransform;
-}
-
ui::Dataspace Layer::translateDataspace(ui::Dataspace dataspace) {
ui::Dataspace updatedDataspace = dataspace;
// translate legacy dataspaces to modern dataspaces
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 9caa20c..60eee9d 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -213,10 +213,6 @@
* GRALLOC_USAGE_PROTECTED sense.
*/
bool isProtected() const;
- /*
- * usesSourceCrop - true if content should use a source crop
- */
- bool usesSourceCrop() const { return hasBufferOrSidebandStream(); }
Rect getCrop(const Layer::State& s) const { return s.crop; }
bool needsFiltering(const DisplayDevice*) const;
@@ -248,17 +244,6 @@
*/
bool willReleaseBufferOnLatch() const;
- /*
- * returns the rectangle that crops the content of the layer and scales it
- * to the layer's size.
- */
- Rect getBufferCrop() const;
-
- /*
- * Returns the transform applied to the buffer.
- */
- uint32_t getBufferTransform() const;
-
sp<GraphicBuffer> getBuffer() const;
/**
* Returns active buffer size in the correct orientation. Buffer size is determined by undoing
@@ -366,8 +351,6 @@
void getFrameStats(FrameStats* outStats) const;
void onDisconnect();
- ui::Transform getTransform() const;
-
half4 getColor() const;
int32_t getBackgroundBlurRadius() const;
bool drawShadows() const { return mEffectiveShadowRadius > 0.f; };
@@ -433,7 +416,6 @@
bool mPendingHWCDestroy{false};
- bool setBufferCrop(const Rect& /* bufferCrop */);
// See mPendingBufferTransactions
void decrementPendingBufferCount();
std::atomic<int32_t>* getPendingBufferCounter() { return &mPendingBufferTransactions; }