summaryrefslogtreecommitdiff
path: root/libs/hwui/renderstate
diff options
context:
space:
mode:
authorGreg Daniel <egdaniel@google.com>2017-01-09 14:15:41 -0500
committerGreg Daniel <egdaniel@google.com>2017-01-10 15:05:07 -0500
commit8cd3edfa15cc9cdbffa935d19ab894426b08d174 (patch)
tree289ec13531b91be5adf6306d8d70434bc756b2c1 /libs/hwui/renderstate
parentd14cafc27255e0ed44665a0975a57c487b841ab1 (diff)
Break Layer class into Gl and Vulkan subclasses
Test: manual testing Change-Id: Ibd2beed39de3ac6da7448e96496253cfe427dfbb
Diffstat (limited to 'libs/hwui/renderstate')
-rw-r--r--libs/hwui/renderstate/RenderState.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/hwui/renderstate/RenderState.cpp b/libs/hwui/renderstate/RenderState.cpp
index 72af7c98e477..a23e676ea996 100644
--- a/libs/hwui/renderstate/RenderState.cpp
+++ b/libs/hwui/renderstate/RenderState.cpp
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#include "GlLayer.h"
#include <GpuMemoryTracker.h>
#include "renderstate/RenderState.h"
@@ -55,7 +56,9 @@ void RenderState::onGLContextCreated() {
}
static void layerLostGlContext(Layer* layer) {
- layer->onGlContextLost();
+ LOG_ALWAYS_FATAL_IF(layer->getApi() != Layer::Api::OpenGL,
+ "layerLostGlContext on non GL layer");
+ static_cast<GlLayer*>(layer)->onGlContextLost();
}
void RenderState::onGLContextDestroyed() {