Merge "Game Driver Metrics: make gpu stats info parcelable"
diff --git a/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl b/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl
index 5b66b92..ccde12a 100644
--- a/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl
+++ b/libs/binder/aidl/android/content/pm/IPackageManagerNative.aidl
@@ -54,4 +54,9 @@
long getVersionCodeForPackage(in String packageName);
+ /**
+ * Return if each app, identified by its package name allows its audio to be recorded.
+ * Unknown packages are mapped to false.
+ */
+ boolean[] isAudioPlaybackCaptureAllowed(in @utf8InCpp String[] packageNames);
}
diff --git a/libs/gui/ISurfaceComposer.cpp b/libs/gui/ISurfaceComposer.cpp
index d2f2539..400daf0 100644
--- a/libs/gui/ISurfaceComposer.cpp
+++ b/libs/gui/ISurfaceComposer.cpp
@@ -792,18 +792,18 @@
Parcel data, reply;
status_t error = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
if (error != NO_ERROR) {
- ALOGE("addRegionSamplingListener: Failed to write interface token");
+ ALOGE("removeRegionSamplingListener: Failed to write interface token");
return error;
}
error = data.writeStrongBinder(IInterface::asBinder(listener));
if (error != NO_ERROR) {
- ALOGE("addRegionSamplingListener: Failed to write listener");
+ ALOGE("removeRegionSamplingListener: Failed to write listener");
return error;
}
error = remote()->transact(BnSurfaceComposer::REMOVE_REGION_SAMPLING_LISTENER, data,
&reply);
if (error != NO_ERROR) {
- ALOGE("addRegionSamplingListener: Failed to transact");
+ ALOGE("removeRegionSamplingListener: Failed to transact");
}
return error;
}
@@ -833,6 +833,33 @@
}
return reply.readInt32();
}
+
+ virtual status_t getAllowedDisplayConfigs(const sp<IBinder>& displayToken,
+ std::vector<int32_t>* outAllowedConfigs) {
+ if (!outAllowedConfigs) return BAD_VALUE;
+ Parcel data, reply;
+ status_t result = data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
+ if (result != NO_ERROR) {
+ ALOGE("getAllowedDisplayConfigs failed to writeInterfaceToken: %d", result);
+ return result;
+ }
+ result = data.writeStrongBinder(displayToken);
+ if (result != NO_ERROR) {
+ ALOGE("getAllowedDisplayConfigs failed to writeStrongBinder: %d", result);
+ return result;
+ }
+ result = remote()->transact(BnSurfaceComposer::GET_ALLOWED_DISPLAY_CONFIGS, data, &reply);
+ if (result != NO_ERROR) {
+ ALOGE("getAllowedDisplayConfigs failed to transact: %d", result);
+ return result;
+ }
+ result = reply.readInt32Vector(outAllowedConfigs);
+ if (result != NO_ERROR) {
+ ALOGE("getAllowedDisplayConfigs failed to readInt32Vector: %d", result);
+ return result;
+ }
+ return reply.readInt32();
+ }
};
// Out-of-line virtual method definition to trigger vtable emission in this
@@ -1354,6 +1381,15 @@
reply->writeInt32(result);
return result;
}
+ case GET_ALLOWED_DISPLAY_CONFIGS: {
+ CHECK_INTERFACE(ISurfaceComposer, data, reply);
+ sp<IBinder> displayToken = data.readStrongBinder();
+ std::vector<int32_t> allowedConfigs;
+ status_t result = getAllowedDisplayConfigs(displayToken, &allowedConfigs);
+ reply->writeInt32Vector(allowedConfigs);
+ reply->writeInt32(result);
+ return result;
+ }
default: {
return BBinder::onTransact(code, data, reply, flags);
}
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index d583e6d..7a39222 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -1388,6 +1388,12 @@
allowedConfigs);
}
+status_t SurfaceComposerClient::getAllowedDisplayConfigs(const sp<IBinder>& displayToken,
+ std::vector<int32_t>* outAllowedConfigs) {
+ return ComposerService::getComposerService()->getAllowedDisplayConfigs(displayToken,
+ outAllowedConfigs);
+}
+
status_t SurfaceComposerClient::getDisplayColorModes(const sp<IBinder>& display,
Vector<ColorMode>* outColorModes) {
return ComposerService::getComposerService()->getDisplayColorModes(display, outColorModes);
diff --git a/libs/gui/include/gui/ISurfaceComposer.h b/libs/gui/include/gui/ISurfaceComposer.h
index eedd5f5..0e576ca 100644
--- a/libs/gui/include/gui/ISurfaceComposer.h
+++ b/libs/gui/include/gui/ISurfaceComposer.h
@@ -368,6 +368,14 @@
*/
virtual status_t setAllowedDisplayConfigs(const sp<IBinder>& displayToken,
const std::vector<int32_t>& allowedConfigs) = 0;
+
+ /*
+ * Returns the allowed display configurations currently set.
+ * The allowedConfigs in a vector of indexes corresponding to the configurations
+ * returned from getDisplayConfigs().
+ */
+ virtual status_t getAllowedDisplayConfigs(const sp<IBinder>& displayToken,
+ std::vector<int32_t>* outAllowedConfigs) = 0;
};
// ----------------------------------------------------------------------------
@@ -416,6 +424,7 @@
ADD_REGION_SAMPLING_LISTENER,
REMOVE_REGION_SAMPLING_LISTENER,
SET_ALLOWED_DISPLAY_CONFIGS,
+ GET_ALLOWED_DISPLAY_CONFIGS,
// Always append new enum to the end.
};
diff --git a/libs/gui/include/gui/SurfaceComposerClient.h b/libs/gui/include/gui/SurfaceComposerClient.h
index 4621a34..e062339 100644
--- a/libs/gui/include/gui/SurfaceComposerClient.h
+++ b/libs/gui/include/gui/SurfaceComposerClient.h
@@ -117,6 +117,12 @@
static status_t setAllowedDisplayConfigs(const sp<IBinder>& displayToken,
const std::vector<int32_t>& allowedConfigs);
+ // Returns the allowed display configurations currently set.
+ // The allowedConfigs in a vector of indexes corresponding to the configurations
+ // returned from getDisplayConfigs().
+ static status_t getAllowedDisplayConfigs(const sp<IBinder>& displayToken,
+ std::vector<int32_t>* outAllowedConfigs);
+
// Gets the list of supported color modes for the given display
static status_t getDisplayColorModes(const sp<IBinder>& display,
Vector<ui::ColorMode>* outColorModes);
diff --git a/libs/gui/tests/Surface_test.cpp b/libs/gui/tests/Surface_test.cpp
index 7f1dc84..a7599e0 100644
--- a/libs/gui/tests/Surface_test.cpp
+++ b/libs/gui/tests/Surface_test.cpp
@@ -683,6 +683,10 @@
const std::vector<int32_t>& /*allowedConfigs*/) override {
return NO_ERROR;
}
+ status_t getAllowedDisplayConfigs(const sp<IBinder>& /*displayToken*/,
+ std::vector<int32_t>* /*outAllowedConfigs*/) override {
+ return NO_ERROR;
+ }
protected:
IBinder* onAsBinder() override { return nullptr; }
diff --git a/libs/ui/Android.bp b/libs/ui/Android.bp
index 00e227f..af95a05 100644
--- a/libs/ui/Android.bp
+++ b/libs/ui/Android.bp
@@ -45,6 +45,8 @@
// Don't warn about struct padding
"-Wno-padded",
+
+ "-Wno-switch-enum",
],
sanitize: {
@@ -68,6 +70,7 @@
"GraphicBufferMapper.cpp",
"HdrCapabilities.cpp",
"PixelFormat.cpp",
+ "PublicFormat.cpp",
"Rect.cpp",
"Region.cpp",
"Size.cpp",
diff --git a/libs/ui/PublicFormat.cpp b/libs/ui/PublicFormat.cpp
new file mode 100644
index 0000000..70e3ce7
--- /dev/null
+++ b/libs/ui/PublicFormat.cpp
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ui/GraphicTypes.h> // ui::Dataspace
+#include <ui/PublicFormat.h>
+
+// ----------------------------------------------------------------------------
+namespace android {
+// ----------------------------------------------------------------------------
+
+using ui::Dataspace;
+
+int mapPublicFormatToHalFormat(PublicFormat f) {
+ switch (f) {
+ case PublicFormat::JPEG:
+ case PublicFormat::DEPTH_POINT_CLOUD:
+ case PublicFormat::DEPTH_JPEG:
+ case PublicFormat::HEIC:
+ return HAL_PIXEL_FORMAT_BLOB;
+ case PublicFormat::DEPTH16:
+ return HAL_PIXEL_FORMAT_Y16;
+ case PublicFormat::RAW_SENSOR:
+ case PublicFormat::RAW_DEPTH:
+ return HAL_PIXEL_FORMAT_RAW16;
+ default:
+ // Most formats map 1:1
+ return static_cast<int>(f);
+ }
+}
+
+android_dataspace mapPublicFormatToHalDataspace(PublicFormat f) {
+ Dataspace dataspace;
+ switch (f) {
+ case PublicFormat::JPEG:
+ dataspace = Dataspace::V0_JFIF;
+ break;
+ case PublicFormat::DEPTH_POINT_CLOUD:
+ case PublicFormat::DEPTH16:
+ case PublicFormat::RAW_DEPTH:
+ dataspace = Dataspace::DEPTH;
+ break;
+ case PublicFormat::RAW_SENSOR:
+ case PublicFormat::RAW_PRIVATE:
+ case PublicFormat::RAW10:
+ case PublicFormat::RAW12:
+ dataspace = Dataspace::ARBITRARY;
+ break;
+ case PublicFormat::YUV_420_888:
+ case PublicFormat::NV21:
+ case PublicFormat::YV12:
+ dataspace = Dataspace::V0_JFIF;
+ break;
+ case PublicFormat::DEPTH_JPEG:
+ dataspace = Dataspace::DYNAMIC_DEPTH;
+ break;
+ case PublicFormat::HEIC:
+ dataspace = Dataspace::HEIF;
+ break;
+ default:
+ // Most formats map to UNKNOWN
+ dataspace = Dataspace::UNKNOWN;
+ break;
+ }
+ return static_cast<android_dataspace>(dataspace);
+}
+
+PublicFormat mapHalFormatDataspaceToPublicFormat(int format, android_dataspace dataSpace) {
+ Dataspace ds = static_cast<Dataspace>(dataSpace);
+ switch (format) {
+ case HAL_PIXEL_FORMAT_RGBA_8888:
+ case HAL_PIXEL_FORMAT_RGBX_8888:
+ case HAL_PIXEL_FORMAT_RGBA_FP16:
+ case HAL_PIXEL_FORMAT_RGBA_1010102:
+ case HAL_PIXEL_FORMAT_RGB_888:
+ case HAL_PIXEL_FORMAT_RGB_565:
+ case HAL_PIXEL_FORMAT_Y8:
+ case HAL_PIXEL_FORMAT_RAW10:
+ case HAL_PIXEL_FORMAT_RAW12:
+ case HAL_PIXEL_FORMAT_YCbCr_420_888:
+ case HAL_PIXEL_FORMAT_YV12:
+ // Enums overlap in both name and value
+ return static_cast<PublicFormat>(format);
+ case HAL_PIXEL_FORMAT_RAW16:
+ switch (ds) {
+ case Dataspace::DEPTH:
+ return PublicFormat::RAW_DEPTH;
+ default:
+ return PublicFormat::RAW_SENSOR;
+ }
+ case HAL_PIXEL_FORMAT_RAW_OPAQUE:
+ // Name differs, though value is the same
+ return PublicFormat::RAW_PRIVATE;
+ case HAL_PIXEL_FORMAT_YCbCr_422_SP:
+ // Name differs, though the value is the same
+ return PublicFormat::NV16;
+ case HAL_PIXEL_FORMAT_YCrCb_420_SP:
+ // Name differs, though the value is the same
+ return PublicFormat::NV21;
+ case HAL_PIXEL_FORMAT_YCbCr_422_I:
+ // Name differs, though the value is the same
+ return PublicFormat::YUY2;
+ case HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED:
+ // Name differs, though the value is the same
+ return PublicFormat::PRIVATE;
+ case HAL_PIXEL_FORMAT_Y16:
+ // Dataspace-dependent
+ switch (ds) {
+ case Dataspace::DEPTH:
+ return PublicFormat::DEPTH16;
+ default:
+ // Assume non-depth Y16 is just Y16.
+ return PublicFormat::Y16;
+ }
+ case HAL_PIXEL_FORMAT_BLOB:
+ // Dataspace-dependent
+ switch (ds) {
+ case Dataspace::DEPTH:
+ return PublicFormat::DEPTH_POINT_CLOUD;
+ case Dataspace::V0_JFIF:
+ return PublicFormat::JPEG;
+ case Dataspace::HEIF:
+ return PublicFormat::HEIC;
+ default:
+ if (dataSpace == static_cast<android_dataspace>(HAL_DATASPACE_DYNAMIC_DEPTH)) {
+ return PublicFormat::DEPTH_JPEG;
+ } else {
+ // Assume otherwise-marked blobs are also JPEG
+ return PublicFormat::JPEG;
+ }
+ }
+ case HAL_PIXEL_FORMAT_BGRA_8888:
+ // Not defined in public API
+ return PublicFormat::UNKNOWN;
+
+ default:
+ return PublicFormat::UNKNOWN;
+ }
+}
+
+// ----------------------------------------------------------------------------
+}; // namespace android
+// ----------------------------------------------------------------------------
diff --git a/libs/ui/include/ui/PublicFormat.h b/libs/ui/include/ui/PublicFormat.h
new file mode 100644
index 0000000..1152cc5
--- /dev/null
+++ b/libs/ui/include/ui/PublicFormat.h
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef UI_PUBLICFORMAT_H
+#define UI_PUBLICFORMAT_H
+
+#include <system/graphics.h>
+
+namespace android {
+
+/**
+ * Enum mirroring the public API definitions for image and pixel formats.
+ * Some of these are hidden in the public API
+ *
+ * Keep up to date with android.graphics.ImageFormat and
+ * android.graphics.PixelFormat
+ *
+ * TODO: PublicFormat is going to be deprecated(b/126594675)
+ */
+enum class PublicFormat {
+ UNKNOWN = 0x0,
+ RGBA_8888 = 0x1,
+ RGBX_8888 = 0x2,
+ RGB_888 = 0x3,
+ RGB_565 = 0x4,
+ NV16 = 0x10,
+ NV21 = 0x11,
+ YUY2 = 0x14,
+ RGBA_FP16 = 0x16,
+ RAW_SENSOR = 0x20,
+ PRIVATE = 0x22,
+ YUV_420_888 = 0x23,
+ RAW_PRIVATE = 0x24,
+ RAW10 = 0x25,
+ RAW12 = 0x26,
+ RGBA_1010102 = 0x2b,
+ JPEG = 0x100,
+ DEPTH_POINT_CLOUD = 0x101,
+ RAW_DEPTH = 0x1002, // @hide
+ YV12 = 0x32315659,
+ Y8 = 0x20203859,
+ Y16 = 0x20363159, // @hide
+ DEPTH16 = 0x44363159,
+ DEPTH_JPEG = 0x69656963,
+ HEIC = 0x48454946,
+};
+
+/* Convert from android.graphics.ImageFormat/PixelFormat enums to graphics.h HAL
+ * format */
+extern int mapPublicFormatToHalFormat(PublicFormat f);
+
+/* Convert from android.graphics.ImageFormat/PixelFormat enums to graphics.h HAL
+ * dataspace */
+extern android_dataspace mapPublicFormatToHalDataspace(PublicFormat f);
+
+/* Convert from HAL format, dataspace pair to
+ * android.graphics.ImageFormat/PixelFormat.
+ * For unknown/unspecified pairs, returns PublicFormat::UNKNOWN */
+extern PublicFormat mapHalFormatDataspaceToPublicFormat(int format, android_dataspace dataSpace);
+
+}; // namespace android
+
+#endif // UI_PUBLICFORMAT_H
diff --git a/services/gpuservice/GpuService.cpp b/services/gpuservice/GpuService.cpp
index d7696f9..a73705b 100644
--- a/services/gpuservice/GpuService.cpp
+++ b/services/gpuservice/GpuService.cpp
@@ -23,6 +23,7 @@
#include <binder/IResultReceiver.h>
#include <binder/Parcel.h>
#include <binder/PermissionCache.h>
+#include <cutils/properties.h>
#include <private/android_filesystem_config.h>
#include <utils/String8.h>
#include <utils/Trace.h>
@@ -38,6 +39,7 @@
namespace {
status_t cmdHelp(int out);
status_t cmdVkjson(int out, int err);
+void dumpGameDriverInfo(std::string* result);
} // namespace
const String16 sDump("android.permission.DUMP");
@@ -96,7 +98,11 @@
}
if (dumpAll) {
+ dumpGameDriverInfo(&result);
+ result.append("\n");
+
mGpuStats->dump(Vector<String16>(), &result);
+ result.append("\n");
}
}
@@ -137,6 +143,18 @@
return NO_ERROR;
}
+void dumpGameDriverInfo(std::string* result) {
+ if (!result) return;
+
+ char stableGameDriver[PROPERTY_VALUE_MAX] = {};
+ property_get("ro.gfx.driver.0", stableGameDriver, "unsupported");
+ StringAppendF(result, "Stable Game Driver: %s\n", stableGameDriver);
+
+ char preReleaseGameDriver[PROPERTY_VALUE_MAX] = {};
+ property_get("ro.gfx.driver.1", preReleaseGameDriver, "unsupported");
+ StringAppendF(result, "Pre-release Game Driver: %s\n", preReleaseGameDriver);
+}
+
} // anonymous namespace
} // namespace android
diff --git a/services/surfaceflinger/AllowedDisplayConfigs.h b/services/surfaceflinger/AllowedDisplayConfigs.h
index e3b9c1f..7ca62ea 100644
--- a/services/surfaceflinger/AllowedDisplayConfigs.h
+++ b/services/surfaceflinger/AllowedDisplayConfigs.h
@@ -54,6 +54,12 @@
return (std::find(mConfigs.begin(), mConfigs.end(), config) != mConfigs.end());
}
+ void getAllowedConfigs(std::vector<int32_t>* outConfigs) const {
+ if (outConfigs) {
+ *outConfigs = mConfigs;
+ }
+ }
+
private:
// add a config to the allowed config set
void addConfig(int32_t config) { mConfigs.push_back(config); }
diff --git a/services/surfaceflinger/LayerProtoHelper.cpp b/services/surfaceflinger/LayerProtoHelper.cpp
index 02383a6..2d6d33c 100644
--- a/services/surfaceflinger/LayerProtoHelper.cpp
+++ b/services/surfaceflinger/LayerProtoHelper.cpp
@@ -49,8 +49,6 @@
Region::const_iterator const tail = region.end();
// Use a lambda do avoid writing the object header when the object is empty
RegionProto* regionProto = getRegionProto();
- uint64_t address = reinterpret_cast<uint64_t>(®ion);
- regionProto->set_id(address);
while (head != tail) {
std::function<RectProto*()> getProtoRect = [&]() { return regionProto->add_rect(); };
writeToProto(*head, getProtoRect);
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 81f148a..cd63a0e 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1309,7 +1309,7 @@
status_t SurfaceFlinger::addRegionSamplingListener(const Rect& samplingArea,
const sp<IBinder>& stopLayerHandle,
const sp<IRegionSamplingListener>& listener) {
- if (!listener) {
+ if (!listener || samplingArea == Rect::INVALID_RECT) {
return BAD_VALUE;
}
mRegionSamplingThread->addListener(samplingArea, stopLayerHandle, listener);
@@ -1317,6 +1317,9 @@
}
status_t SurfaceFlinger::removeRegionSamplingListener(const sp<IRegionSamplingListener>& listener) {
+ if (!listener) {
+ return BAD_VALUE;
+ }
mRegionSamplingThread->removeListener(listener);
return NO_ERROR;
}
@@ -4912,6 +4915,7 @@
case GET_HDR_CAPABILITIES:
case SET_ACTIVE_CONFIG:
case SET_ALLOWED_DISPLAY_CONFIGS:
+ case GET_ALLOWED_DISPLAY_CONFIGS:
case SET_ACTIVE_COLOR_MODE:
case INJECT_VSYNC:
case SET_POWER_MODE:
@@ -5808,6 +5812,36 @@
return NO_ERROR;
}
+status_t SurfaceFlinger::getAllowedDisplayConfigs(const android::sp<android::IBinder>& displayToken,
+ std::vector<int32_t>* outAllowedConfigs) {
+ ATRACE_CALL();
+
+ if (!displayToken) {
+ ALOGE("getAllowedDisplayConfigs: displayToken is null");
+ return BAD_VALUE;
+ }
+
+ if (!outAllowedConfigs) {
+ ALOGE("getAllowedDisplayConfigs: outAllowedConfigs is null");
+ return BAD_VALUE;
+ }
+
+ ConditionalLock stateLock(mStateLock, std::this_thread::get_id() != mMainThreadId);
+ const auto displayId = getPhysicalDisplayIdLocked(displayToken);
+ if (!displayId) {
+ ALOGE("getAllowedDisplayConfigs: display not found");
+ return NAME_NOT_FOUND;
+ }
+
+ std::lock_guard allowedConfigLock(mAllowedConfigsLock);
+ auto allowedConfigIterator = mAllowedConfigs.find(displayId.value());
+ if (allowedConfigIterator != mAllowedConfigs.end()) {
+ allowedConfigIterator->second->getAllowedConfigs(outAllowedConfigs);
+ }
+
+ return NO_ERROR;
+}
+
// ----------------------------------------------------------------------------
void SetInputWindowsListener::onSetInputWindowsFinished() {
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 0bf6ac5..8f80175 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -489,6 +489,8 @@
status_t removeRegionSamplingListener(const sp<IRegionSamplingListener>& listener) override;
status_t setAllowedDisplayConfigs(const sp<IBinder>& displayToken,
const std::vector<int32_t>& allowedConfigs) override;
+ status_t getAllowedDisplayConfigs(const sp<IBinder>& displayToken,
+ std::vector<int32_t>* outAllowedConfigs) override;
/* ------------------------------------------------------------------------
* DeathRecipient interface
diff --git a/services/surfaceflinger/layerproto/LayerProtoParser.cpp b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
index 7ab57f9..7288232 100644
--- a/services/surfaceflinger/layerproto/LayerProtoParser.cpp
+++ b/services/surfaceflinger/layerproto/LayerProtoParser.cpp
@@ -132,7 +132,6 @@
LayerProtoParser::Region LayerProtoParser::generateRegion(const RegionProto& regionProto) {
LayerProtoParser::Region region;
- region.id = regionProto.id();
for (int i = 0; i < regionProto.rect_size(); i++) {
const RectProto& rectProto = regionProto.rect(i);
region.rects.push_back(generateRect(rectProto));
diff --git a/services/surfaceflinger/layerproto/layers.proto b/services/surfaceflinger/layerproto/layers.proto
index a0fb0a0..fd4695e 100644
--- a/services/surfaceflinger/layerproto/layers.proto
+++ b/services/surfaceflinger/layerproto/layers.proto
@@ -117,7 +117,7 @@
}
message RegionProto {
- uint64 id = 1;
+ reserved 1; // Previously: uint64 id
repeated RectProto rect = 2;
}