flutter_flutter/sky/compositor/transform_layer.h
Adam Barth 2e5d3c4977 Preroll rasterization
Prerolling the rasterization tasks reduces the number of render target
switches because we don't interrupt the main render target.
2016-01-08 13:17:13 -08:00

34 lines
851 B
C++

// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_COMPOSITOR_TRANSFORM_LAYER_H_
#define SKY_COMPOSITOR_TRANSFORM_LAYER_H_
#include "sky/compositor/container_layer.h"
namespace sky {
namespace compositor {
class TransformLayer : public ContainerLayer {
public:
TransformLayer();
~TransformLayer() override;
void set_transform(const SkMatrix& transform) { transform_ = transform; }
void Preroll(PaintContext::ScopedFrame& frame,
const SkMatrix& matrix) override;
void Paint(PaintContext::ScopedFrame& frame) override;
private:
SkMatrix transform_;
DISALLOW_COPY_AND_ASSIGN(TransformLayer);
};
} // namespace compositor
} // namespace sky
#endif // SKY_COMPOSITOR_TRANSFORM_LAYER_H_