Merge "Use access directly instead of sk_exists."
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
#include "utils/TraceUtils.h"
|
||||
#include <SkImageEncoder.h>
|
||||
#include <SkImagePriv.h>
|
||||
#include <SkOSFile.h>
|
||||
#include <SkOverdrawCanvas.h>
|
||||
#include <SkOverdrawColorFilter.h>
|
||||
#include <SkPicture.h>
|
||||
@@ -27,6 +26,8 @@
|
||||
#include <SkPixelSerializer.h>
|
||||
#include <SkStream.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
using namespace android::uirenderer::renderthread;
|
||||
|
||||
namespace android {
|
||||
@@ -190,7 +191,7 @@ void SkiaPipeline::renderFrame(const LayerUpdateQueue& layers, const SkRect& cli
|
||||
char prop[PROPERTY_VALUE_MAX];
|
||||
if (skpCaptureEnabled()) {
|
||||
property_get("debug.hwui.capture_frame_as_skp", prop, "0");
|
||||
recordingPicture = prop[0] != '0' && !sk_exists(prop);
|
||||
recordingPicture = prop[0] != '0' && access(prop, F_OK) != 0;
|
||||
if (recordingPicture) {
|
||||
recorder.reset(new SkPictureRecorder());
|
||||
canvas = recorder->beginRecording(surface->width(), surface->height(),
|
||||
|
||||
Reference in New Issue
Block a user