Fix HWUI Sink for DM

Review URL: https://codereview.chromium.org/996413002
This commit is contained in:
Derek Sollenberger 2015-03-12 07:52:22 -04:00
parent 084340bb9b
commit 97f43946fc
2 changed files with 2 additions and 7 deletions

View File

@ -294,9 +294,8 @@ Error HWUISink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString*) const
proxy->initialize(surface.get());
float lightX = size.width() / 2.0f;
android::uirenderer::Vector3 lightVector { lightX, dp(-200.0f), dp(800.0f) };
proxy->setup(size.width(), size.height(), lightVector, dp(800.0f), 255 * 0.075f, 255 * 0.15f,
kDensity);
android::uirenderer::Vector3 lightVector { lightX, -200.0f, 800.0f };
proxy->setup(size.width(), size.height(), lightVector, 800.0f, 255 * 0.075f, 255 * 0.15f);
// Do the draw

View File

@ -25,10 +25,6 @@ public:
Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
int enclave() const SK_OVERRIDE { return kGPU_Enclave; }
const char* fileExtension() const SK_OVERRIDE { return "png"; }
private:
const float kDensity = 1.0f;
inline float dp(int x) const { return x * kDensity; }
};
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/