Use TargetTransform instead of transform in ConvertPointFor/FromAncestor
[chromium-blink-merge.git] / cc / caching_bitmap_content_layer_updater.h
blob630e2f3380f8427ecaff6826848c02b279d34ea4
1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_
6 #define CC_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_
8 #include "base/compiler_specific.h"
9 #include "cc/bitmap_content_layer_updater.h"
10 #include "third_party/skia/include/core/SkBitmap.h"
12 namespace cc {
14 class CachingBitmapContentLayerUpdater
15 : public BitmapContentLayerUpdater {
16 public:
17 static scoped_refptr<CachingBitmapContentLayerUpdater> Create(
18 scoped_ptr<LayerPainter>);
20 virtual void prepareToUpdate(const gfx::Rect& content_rect,
21 const gfx::Size& tile_size,
22 float contents_width_scale,
23 float contents_height_scale,
24 gfx::Rect& resulting_opaque_rect,
25 RenderingStats&) OVERRIDE;
27 bool pixelsDidChange() const;
29 private:
30 explicit CachingBitmapContentLayerUpdater(
31 scoped_ptr<LayerPainter> painter);
32 virtual ~CachingBitmapContentLayerUpdater();
34 bool pixels_did_change_;
35 SkBitmap cached_bitmap_;
38 } // namespace cc
40 #endif // CC_CACHING_BITMAP_CONTENT_LAYER_UPDATER_H_