blob: 7460e3e47fa2d4051442daa2106c210df973c87c [file] [log] [blame]
Romain Guy6c319ca2011-01-11 14:29:25 -08001/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Chris Craik5e00c7c2016-07-06 16:10:09 -070017#pragma once
Romain Guy6c319ca2011-01-11 14:29:25 -080018
Romain Guy79537452011-10-12 13:48:51 -070019#include <cutils/compiler.h>
20
Romain Guyada830f2011-01-13 12:13:20 -080021#include "Layer.h"
Romain Guy6c319ca2011-01-11 14:29:25 -080022
Romain Guy77a81162011-06-14 16:45:55 -070023#include <SkBitmap.h>
24
Romain Guy6c319ca2011-01-11 14:29:25 -080025namespace android {
26namespace uirenderer {
27
John Reck3b202512014-06-23 13:13:08 -070028class RenderState;
29
Romain Guy6c319ca2011-01-11 14:29:25 -080030///////////////////////////////////////////////////////////////////////////////
Romain Guy1fc883b2011-01-12 14:30:59 -080031// Defines
32///////////////////////////////////////////////////////////////////////////////
33
34// Debug
35#if DEBUG_LAYER_RENDERER
Steve Block5baa3a62011-12-20 16:23:08 +000036 #define LAYER_RENDERER_LOGD(...) ALOGD(__VA_ARGS__)
Romain Guy1fc883b2011-01-12 14:30:59 -080037#else
38 #define LAYER_RENDERER_LOGD(...)
39#endif
40
41///////////////////////////////////////////////////////////////////////////////
Romain Guy6c319ca2011-01-11 14:29:25 -080042// Renderer
43///////////////////////////////////////////////////////////////////////////////
44
Chris Craik5e00c7c2016-07-06 16:10:09 -070045class LayerRenderer {
Romain Guy6c319ca2011-01-11 14:29:25 -080046public:
John Reck3b202512014-06-23 13:13:08 -070047 static Layer* createTextureLayer(RenderState& renderState);
John Reck3b202512014-06-23 13:13:08 -070048 static void updateTextureLayer(Layer* layer, uint32_t width, uint32_t height,
Chris Craikd2dfd8f2015-12-16 14:27:20 -080049 bool isOpaque, bool forceFilter, GLenum renderTarget, const float* textureTransform);
Romain Guy6c319ca2011-01-11 14:29:25 -080050}; // class LayerRenderer
51
52}; // namespace uirenderer
53}; // namespace android