2015-03-26 18:28:06 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2015 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nanobenchAndroid_DEFINED
|
|
|
|
#define nanobenchAndroid_DEFINED
|
|
|
|
|
|
|
|
#include "SkAndroidSDKCanvas.h"
|
2015-10-26 14:21:31 +00:00
|
|
|
#include <utils/TestWindowContext.h>
|
2015-03-26 18:28:06 +00:00
|
|
|
|
|
|
|
#include "nanobench.h"
|
|
|
|
|
|
|
|
struct HWUITarget : public Target {
|
|
|
|
explicit HWUITarget(const Config& c, Benchmark* bench);
|
|
|
|
|
2015-10-26 14:21:31 +00:00
|
|
|
android::uirenderer::TestWindowContext renderer;
|
2015-03-26 18:28:06 +00:00
|
|
|
SkAndroidSDKCanvas fc;
|
|
|
|
|
|
|
|
void setup() override;
|
|
|
|
SkCanvas* beginTiming(SkCanvas* canvas) override;
|
|
|
|
void endTiming() override;
|
|
|
|
void fence() override;
|
2015-06-23 20:23:44 +00:00
|
|
|
bool needsFrameTiming(int* frameLag) const override;
|
2015-03-26 18:28:06 +00:00
|
|
|
|
|
|
|
bool init(SkImageInfo info, Benchmark* bench) override;
|
|
|
|
bool capturePixels(SkBitmap* bmp) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nanobenchAndroid_DEFINED
|