diff options
author | John Reck <jreck@google.com> | 2018-10-29 16:45:58 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2018-11-08 15:32:35 -0800 |
commit | 8785ceb3b94b78312cd24e22f05610d9b654221e (patch) | |
tree | b5d3016cfa322fb354bf41b09ca86abc8e10365a /libs/hwui/renderthread/CanvasContext.cpp | |
parent | 22b63148b14a0aac39323c1590c1cae3dc101979 (diff) |
Refactors and a potential public API for rendering
Split out the View/ViewRootImpl bits from the
hardware rendering bits.
Create a potential public API surface for
hardware rendering
Bug: 112709971
Test: builds & boots
Change-Id: I9e6f44b07a170574a905f42338282c4bb7e95f56
Diffstat (limited to 'libs/hwui/renderthread/CanvasContext.cpp')
-rw-r--r-- | libs/hwui/renderthread/CanvasContext.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp index 92a749f3da33..f1a522ecd588 100644 --- a/libs/hwui/renderthread/CanvasContext.cpp +++ b/libs/hwui/renderthread/CanvasContext.cpp @@ -180,14 +180,20 @@ void CanvasContext::setStopped(bool stopped) { } } -void CanvasContext::setup(float lightRadius, uint8_t ambientShadowAlpha, uint8_t spotShadowAlpha) { - mLightGeometry.radius = lightRadius; +void CanvasContext::allocateBuffers() { + if (mNativeSurface) { + mNativeSurface->allocateBuffers(); + } +} + +void CanvasContext::setLightAlpha(uint8_t ambientShadowAlpha, uint8_t spotShadowAlpha) { mLightInfo.ambientShadowAlpha = ambientShadowAlpha; mLightInfo.spotShadowAlpha = spotShadowAlpha; } -void CanvasContext::setLightCenter(const Vector3& lightCenter) { +void CanvasContext::setLightGeometry(const Vector3& lightCenter, float lightRadius) { mLightGeometry.center = lightCenter; + mLightGeometry.radius = lightRadius; } void CanvasContext::setOpaque(bool opaque) { |