OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CRUSHED_SPRITE_LAYER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CRUSHED_SPRITE_LAYER_H_ |
6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CRUSHED_SPRITE_LAYER_H_ | 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CRUSHED_SPRITE_LAYER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "chrome/browser/android/compositor/layer/layer.h" | 9 #include "chrome/browser/android/compositor/layer/layer.h" |
10 #include "third_party/skia/include/core/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 scoped_refptr<cc::Layer> layer() override; | 42 scoped_refptr<cc::Layer> layer() override; |
43 | 43 |
44 protected: | 44 protected: |
45 CrushedSpriteLayer(); | 45 CrushedSpriteLayer(); |
46 ~CrushedSpriteLayer() override; | 46 ~CrushedSpriteLayer() override; |
47 | 47 |
48 private: | 48 private: |
49 // Draws the rectangles for |frame| to |canvas|. | 49 // Draws the rectangles for |frame| to |canvas|. |
50 void DrawRectanglesForFrame(ui::CrushedSpriteResource* resource, | 50 void DrawRectanglesForFrame(ui::CrushedSpriteResource* resource, |
51 int frame, | 51 int frame, |
52 sk_sp<SkCanvas> canvas); | 52 SkCanvas* canvas); |
53 | 53 |
54 scoped_refptr<cc::UIResourceLayer> layer_; | 54 scoped_refptr<cc::UIResourceLayer> layer_; |
55 int frame_count_; | 55 int frame_count_; |
56 int previous_frame_; | 56 int previous_frame_; |
57 SkBitmap previous_frame_bitmap_; | 57 SkBitmap previous_frame_bitmap_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(CrushedSpriteLayer); | 59 DISALLOW_COPY_AND_ASSIGN(CrushedSpriteLayer); |
60 }; | 60 }; |
61 | 61 |
62 } // namespace android | 62 } // namespace android |
63 | 63 |
64 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CRUSHED_SPRITE_LAYER_H_ | 64 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_LAYER_CRUSHED_SPRITE_LAYER_H_ |
OLD | NEW |