Use access directly instead of sk_exists.
Skia would like to move SkOSFile and make it private spi. This appears to be the only place SkOSFile is used outside Skia, and using access here directly is more apropriate. Test: Simple inline refactor, built and ran. Changes test code only. Change-Id: Ib76c180bb3bccc54c20dcadc842837e3e8270929
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