summaryrefslogtreecommitdiff
path: root/libs/hwui/tests
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2019-05-29 16:55:06 -0700
committerJohn Reck <jreck@google.com>2019-05-29 16:55:06 -0700
commit23462d88f5a3753111aba3835a5aef8e619468d6 (patch)
tree6ae4838d76cbd805cb137160e41ed6b9bfd829d0 /libs/hwui/tests
parentbff389970f1b1af379931f81e0386260ace0dc2e (diff)
Delete wrap_gles capability
* Error enforcement doesn't work with libhwui anymore * We can just do the real, proper thing for unit tests & microbenchmarks, which is arguably better anyway * hwui doesn't have much opengl code left that was wrapped Fixes: 128629988 Test: hwuiunit, hwuimacro, and hwuimicro all still run Change-Id: If2568ea0745a67f83e1290860d474c1a01870376
Diffstat (limited to 'libs/hwui/tests')
-rw-r--r--libs/hwui/tests/microbench/main.cpp5
-rw-r--r--libs/hwui/tests/unit/SkiaPipelineTests.cpp13
-rw-r--r--libs/hwui/tests/unit/main.cpp3
3 files changed, 3 insertions, 18 deletions
diff --git a/libs/hwui/tests/microbench/main.cpp b/libs/hwui/tests/microbench/main.cpp
index b5abf5bc5efa..9c4d25968d60 100644
--- a/libs/hwui/tests/microbench/main.cpp
+++ b/libs/hwui/tests/microbench/main.cpp
@@ -14,9 +14,6 @@
* limitations under the License.
*/
-#include "debug/GlesDriver.h"
-#include "debug/NullGlesDriver.h"
-
#include "hwui/Typeface.h"
#include <benchmark/benchmark.h>
@@ -24,10 +21,8 @@
#include <memory>
using namespace android;
-using namespace android::uirenderer;
int main(int argc, char** argv) {
- debug::GlesDriver::replace(std::make_unique<debug::NullGlesDriver>());
benchmark::Initialize(&argc, argv);
Typeface::setRobotoTypefaceForTest();
benchmark::RunSpecifiedBenchmarks();
diff --git a/libs/hwui/tests/unit/SkiaPipelineTests.cpp b/libs/hwui/tests/unit/SkiaPipelineTests.cpp
index a671bdada09a..7b76bd80de4d 100644
--- a/libs/hwui/tests/unit/SkiaPipelineTests.cpp
+++ b/libs/hwui/tests/unit/SkiaPipelineTests.cpp
@@ -29,6 +29,7 @@
#include "pipeline/skia/SkiaRecordingCanvas.h"
#include "pipeline/skia/SkiaUtils.h"
#include "renderthread/CanvasContext.h"
+#include "tests/common/TestContext.h"
#include "tests/common/TestUtils.h"
#include <gui/BufferItemConsumer.h>
@@ -424,17 +425,9 @@ RENDERTHREAD_SKIA_PIPELINE_TEST(SkiaPipeline, clip_replace) {
EXPECT_EQ(1, surface->canvas()->mDrawCounter);
}
-static sp<Surface> createDummySurface() {
- sp<IGraphicBufferProducer> producer;
- sp<IGraphicBufferConsumer> consumer;
- BufferQueue::createBufferQueue(&producer, &consumer);
- producer->setMaxDequeuedBufferCount(1);
- producer->setAsyncMode(true);
- return new Surface(producer);
-}
-
RENDERTHREAD_SKIA_PIPELINE_TEST(SkiaPipeline, context_lost) {
- auto surface = createDummySurface();
+ test::TestContext context;
+ auto surface = context.surface();
auto pipeline = std::make_unique<SkiaOpenGLPipeline>(renderThread);
EXPECT_FALSE(pipeline->isSurfaceReady());
EXPECT_TRUE(pipeline->setSurface(surface.get(), SwapBehavior::kSwap_default, ColorMode::SRGB, 0));
diff --git a/libs/hwui/tests/unit/main.cpp b/libs/hwui/tests/unit/main.cpp
index 83d888c310f0..402cb5814366 100644
--- a/libs/hwui/tests/unit/main.cpp
+++ b/libs/hwui/tests/unit/main.cpp
@@ -18,8 +18,6 @@
#include "gtest/gtest.h"
#include "Properties.h"
-#include "debug/GlesDriver.h"
-#include "debug/NullGlesDriver.h"
#include "hwui/Typeface.h"
#include "tests/common/LeakChecker.h"
@@ -65,7 +63,6 @@ int main(int argc, char* argv[]) {
}
// Replace the default GLES driver
- debug::GlesDriver::replace(std::make_unique<debug::NullGlesDriver>());
Properties::isolatedProcess = true;
// Run the tests