blob: 5e305cf9c7ef54b53ad83073ba037173b83b41be [file] [log] [blame]
// Copyright 2012 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 CC_PICTURE_PILE_H_
#define CC_PICTURE_PILE_H_
#include "cc/picture_pile_base.h"
#include "ui/gfx/rect.h"
namespace cc {
class PicturePileImpl;
class Region;
struct RenderingStats;
class CC_EXPORT PicturePile : public PicturePileBase {
public:
PicturePile();
// Re-record parts of the picture that are invalid.
// Invalidations are in layer space.
void Update(
ContentLayerClient* painter,
SkColor background_color,
const Region& invalidation,
gfx::Rect visible_layer_rect,
RenderingStats* stats);
// Update other with a shallow copy of this (main => compositor thread commit)
void PushPropertiesTo(PicturePileImpl* other);
void set_num_raster_threads(int num_raster_threads) {
num_raster_threads_ = num_raster_threads;
}
private:
virtual ~PicturePile();
friend class PicturePileImpl;
// Add an invalidation to this picture list. If the list needs to be
// entirely recreated, leave it empty. Do not call this on an empty list.
void InvalidateRect(
PictureList& picture_list,
gfx::Rect invalidation);
int num_raster_threads_;
DISALLOW_COPY_AND_ASSIGN(PicturePile);
};
} // namespace cc
#endif // CC_PICTURE_PILE_H_