Romain Guy | 6c319ca | 2011-01-11 14:29:25 -0800 | [diff] [blame] | 1 | /* |
| 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 Craik | 5e00c7c | 2016-07-06 16:10:09 -0700 | [diff] [blame] | 17 | #pragma once |
Romain Guy | 6c319ca | 2011-01-11 14:29:25 -0800 | [diff] [blame] | 18 | |
Romain Guy | 7953745 | 2011-10-12 13:48:51 -0700 | [diff] [blame] | 19 | #include <cutils/compiler.h> |
| 20 | |
Romain Guy | ada830f | 2011-01-13 12:13:20 -0800 | [diff] [blame] | 21 | #include "Layer.h" |
Romain Guy | 6c319ca | 2011-01-11 14:29:25 -0800 | [diff] [blame] | 22 | |
Romain Guy | 77a8116 | 2011-06-14 16:45:55 -0700 | [diff] [blame] | 23 | #include <SkBitmap.h> |
| 24 | |
Romain Guy | 6c319ca | 2011-01-11 14:29:25 -0800 | [diff] [blame] | 25 | namespace android { |
| 26 | namespace uirenderer { |
| 27 | |
John Reck | 3b20251 | 2014-06-23 13:13:08 -0700 | [diff] [blame] | 28 | class RenderState; |
| 29 | |
Romain Guy | 6c319ca | 2011-01-11 14:29:25 -0800 | [diff] [blame] | 30 | /////////////////////////////////////////////////////////////////////////////// |
Romain Guy | 1fc883b | 2011-01-12 14:30:59 -0800 | [diff] [blame] | 31 | // Defines |
| 32 | /////////////////////////////////////////////////////////////////////////////// |
| 33 | |
| 34 | // Debug |
| 35 | #if DEBUG_LAYER_RENDERER |
Steve Block | 5baa3a6 | 2011-12-20 16:23:08 +0000 | [diff] [blame] | 36 | #define LAYER_RENDERER_LOGD(...) ALOGD(__VA_ARGS__) |
Romain Guy | 1fc883b | 2011-01-12 14:30:59 -0800 | [diff] [blame] | 37 | #else |
| 38 | #define LAYER_RENDERER_LOGD(...) |
| 39 | #endif |
| 40 | |
| 41 | /////////////////////////////////////////////////////////////////////////////// |
Romain Guy | 6c319ca | 2011-01-11 14:29:25 -0800 | [diff] [blame] | 42 | // Renderer |
| 43 | /////////////////////////////////////////////////////////////////////////////// |
| 44 | |
Chris Craik | 5e00c7c | 2016-07-06 16:10:09 -0700 | [diff] [blame] | 45 | class LayerRenderer { |
Romain Guy | 6c319ca | 2011-01-11 14:29:25 -0800 | [diff] [blame] | 46 | public: |
John Reck | 3b20251 | 2014-06-23 13:13:08 -0700 | [diff] [blame] | 47 | static Layer* createTextureLayer(RenderState& renderState); |
John Reck | 3b20251 | 2014-06-23 13:13:08 -0700 | [diff] [blame] | 48 | static void updateTextureLayer(Layer* layer, uint32_t width, uint32_t height, |
Chris Craik | d2dfd8f | 2015-12-16 14:27:20 -0800 | [diff] [blame] | 49 | bool isOpaque, bool forceFilter, GLenum renderTarget, const float* textureTransform); |
Romain Guy | 6c319ca | 2011-01-11 14:29:25 -0800 | [diff] [blame] | 50 | }; // class LayerRenderer |
| 51 | |
| 52 | }; // namespace uirenderer |
| 53 | }; // namespace android |