15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// found in the LICENSE file. 45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifndef CC_LAYERS_SURFACE_LAYER_H_ 65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define CC_LAYERS_SURFACE_LAYER_H_ 75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "cc/base/cc_export.h" 95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "cc/layers/layer.h" 10f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)#include "cc/surfaces/surface_id.h" 115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)namespace cc { 135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// A layer that renders a surface referencing the output of another compositor 155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// instance or client. 165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class CC_EXPORT SurfaceLayer : public Layer { 175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) public: 185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) static scoped_refptr<SurfaceLayer> Create(); 195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 20f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) void SetSurfaceId(SurfaceId surface_id); 215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // Layer overrides. 235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) 245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) OVERRIDE; 255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE; 265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) protected: 285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) SurfaceLayer(); 296e8cce623b6e4fe0c9e4af605d675dd9d0338c38Torne (Richard Coles) virtual bool HasDrawableContent() const OVERRIDE; 305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) private: 325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) virtual ~SurfaceLayer(); 335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 34f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) SurfaceId surface_id_; 355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(SurfaceLayer); 375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}; 385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} // namespace cc 405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif // CC_LAYERS_SURFACE_LAYER_H_ 42