1 /* 2 * Copyright (C) 2012 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 17 #ifndef FixedBackgroundLayerAndroid_h 18 #define FixedBackgroundLayerAndroid_h 19 20 #if USE(ACCELERATED_COMPOSITING) 21 22 #include "LayerAndroid.h" 23 24 namespace WebCore { 25 26 // TODO: the hierarchy manipulation in GraphicsLayerAndroid should 27 // (at least partly) be handled in this class 28 class FixedBackgroundLayerAndroid : public LayerAndroid { 29 public: 30 FixedBackgroundLayerAndroid(RenderLayer* owner) 31 : LayerAndroid(owner) {} 32 FixedBackgroundLayerAndroid(const FixedBackgroundLayerAndroid& layer) 33 : LayerAndroid(layer) {} 34 FixedBackgroundLayerAndroid(const LayerAndroid& layer) 35 : LayerAndroid(layer) {} 36 virtual ~FixedBackgroundLayerAndroid() {}; 37 38 virtual LayerAndroid* copy() const { return new FixedBackgroundLayerAndroid(*this); } 39 40 virtual bool isFixedBackground() const { return true; } 41 42 virtual SubclassType subclassType() const { return LayerAndroid::FixedBackgroundLayer; } 43 }; 44 45 } 46 47 #endif // USE(ACCELERATED_COMPOSITING) 48 49 #endif // FixedBackgroundLayerAndroid_h 50