diff options
Diffstat (limited to 'libs')
3 files changed, 11 insertions, 11 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java b/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java index ae0975467e3f..e3029e55a214 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogGroup.java @@ -24,6 +24,8 @@ import com.android.internal.protolog.common.IProtoLogGroup; * This file is used by the ProtoLogTool to generate optimized logging code. */ public enum ShellProtoLogGroup implements IProtoLogGroup { + // NOTE: Since we enable these from the same WM ShellCommand, these names should not conflict + // with those in the framework ProtoLogGroup WM_SHELL_TASK_ORG(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false, Consts.TAG_WM_SHELL), TEST_GROUP(true, true, false, "WindowManagerShellProtoLogTest"); diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogImpl.java b/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogImpl.java index 6a925e74e847..66ecf453c362 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogImpl.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/protolog/ShellProtoLogImpl.java @@ -44,8 +44,6 @@ public class ShellProtoLogImpl extends BaseProtoLogImpl { private static ShellProtoLogImpl sServiceInstance = null; - private final PrintWriter mSystemOutWriter; - static { addLogGroupEnum(ShellProtoLogGroup.values()); } @@ -111,11 +109,11 @@ public class ShellProtoLogImpl extends BaseProtoLogImpl { return sServiceInstance; } - public void startTextLogging(Context context, String... groups) { + public int startTextLogging(Context context, String[] groups, PrintWriter pw) { try { mViewerConfig.loadViewerConfig( context.getResources().openRawResource(R.raw.wm_shell_protolog)); - setLogging(true /* setTextLogging */, true, mSystemOutWriter, groups); + return setLogging(true /* setTextLogging */, true, pw, groups); } catch (IOException e) { Log.i(TAG, "Unable to load log definitions: IOException while reading " + "wm_shell_protolog. " + e); @@ -123,16 +121,15 @@ public class ShellProtoLogImpl extends BaseProtoLogImpl { Log.i(TAG, "Unable to load log definitions: JSON parsing exception while reading " + "wm_shell_protolog. " + e); } + return -1; } - public void stopTextLogging(String... groups) { - setLogging(true /* setTextLogging */, false, mSystemOutWriter, groups); + public int stopTextLogging(String[] groups, PrintWriter pw) { + return setLogging(true /* setTextLogging */, false, pw, groups); } private ShellProtoLogImpl() { - super(new File(LOG_FILENAME), null, BUFFER_CAPACITY, - new ProtoLogViewerConfigReader()); - mSystemOutWriter = new PrintWriter(System.out, true); + super(new File(LOG_FILENAME), null, BUFFER_CAPACITY, new ProtoLogViewerConfigReader()); } } diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp index 4dbce92ed01c..1333b92037c3 100644 --- a/libs/hwui/renderthread/VulkanManager.cpp +++ b/libs/hwui/renderthread/VulkanManager.cpp @@ -516,8 +516,9 @@ void VulkanManager::swapBuffers(VulkanSurface* surface, const SkRect& dirtyRect) flushInfo.fFinishedContext = destroyInfo; GrSemaphoresSubmitted submitted = bufferInfo->skSurface->flush( SkSurface::BackendSurfaceAccess::kPresent, flushInfo); - ALOGE_IF(!bufferInfo->skSurface->getContext(), "Surface is not backed by gpu"); - bufferInfo->skSurface->getContext()->submit(); + GrDirectContext* context = GrAsDirectContext(bufferInfo->skSurface->recordingContext()); + ALOGE_IF(!context, "Surface is not backed by gpu"); + context->submit(); if (submitted == GrSemaphoresSubmitted::kYes) { VkSemaphoreGetFdInfoKHR getFdInfo; getFdInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR; |