diff options
Diffstat (limited to 'libs/hwui/utils/TestWindowContext.cpp')
| -rw-r--r-- | libs/hwui/utils/TestWindowContext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/hwui/utils/TestWindowContext.cpp b/libs/hwui/utils/TestWindowContext.cpp index b3195c4bbbfb..e0b2593323b2 100644 --- a/libs/hwui/utils/TestWindowContext.cpp +++ b/libs/hwui/utils/TestWindowContext.cpp @@ -28,6 +28,7 @@ #include "gui/Surface.h" #include "renderthread/RenderProxy.h" +#include <cutils/memory.h> namespace { @@ -57,7 +58,7 @@ class TestWindowContext::TestWindowData { public: - TestWindowData(SkISize size) : mSize(size) { + explicit TestWindowData(SkISize size) : mSize(size) { android::BufferQueue::createBufferQueue(&mProducer, &mConsumer); mCpuConsumer = new android::CpuConsumer(mConsumer, 1); mCpuConsumer->setName(android::String8("TestWindowContext")); @@ -86,8 +87,7 @@ public: mProxy->initialize(mAndroidSurface.get()); float lightX = mSize.width() / 2.0f; android::uirenderer::Vector3 lightVector { lightX, -200.0f, 800.0f }; - mProxy->setup(mSize.width(), mSize.height(), 800.0f, - 255 * 0.075f, 255 * 0.15f); + mProxy->setup(800.0f, 255 * 0.075f, 255 * 0.15f); mProxy->setLightCenter(lightVector); #if HWUI_NEW_OPS mCanvas.reset(new android::uirenderer::RecordingCanvas(mSize.width(), mSize.height())); @@ -119,8 +119,8 @@ public: SkImageInfo::Make(mSize.width(), mSize.height(), kRGBA_8888_SkColorType, kPremul_SkAlphaType); bmp->allocPixels(destinationConfig); - sk_memset32((uint32_t*) bmp->getPixels(), SK_ColorRED, - mSize.width() * mSize.height()); + android_memset32((uint32_t*) bmp->getPixels(), SK_ColorRED, + mSize.width() * mSize.height() * 4); android::CpuConsumer::LockedBuffer nativeBuffer; android::status_t retval = mCpuConsumer->lockNextBuffer(&nativeBuffer); |
