Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: cc/test/fake_content_layer_client.h

Issue 1869753003: Replace many skia::RefPtr with sk_sp<> in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 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 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 CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ 5 #ifndef CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_
6 #define CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ 6 #define CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "cc/layers/content_layer_client.h" 14 #include "cc/layers/content_layer_client.h"
15 #include "skia/ext/refptr.h"
danakj 2016/04/14 19:37:32 ?
tomhudson 2016/04/25 20:48:15 Done.
15 #include "third_party/skia/include/core/SkPaint.h" 16 #include "third_party/skia/include/core/SkPaint.h"
16 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
17 #include "ui/gfx/geometry/rect_f.h" 18 #include "ui/gfx/geometry/rect_f.h"
18 #include "ui/gfx/transform.h" 19 #include "ui/gfx/transform.h"
19 20
20 class SkImage; 21 class SkImage;
21 22
22 namespace cc { 23 namespace cc {
23 24
24 class FakeContentLayerClient : public ContentLayerClient { 25 class FakeContentLayerClient : public ContentLayerClient {
25 public: 26 public:
26 struct ImageData { 27 struct ImageData {
27 ImageData(const SkImage* image, 28 ImageData(const SkImage* image,
28 const gfx::Point& point, 29 const gfx::Point& point,
29 const SkPaint& paint); 30 const SkPaint& paint);
30 ImageData(const SkImage* image, 31 ImageData(const SkImage* image,
31 const gfx::Transform& transform, 32 const gfx::Transform& transform,
32 const SkPaint& paint); 33 const SkPaint& paint);
33 ImageData(const ImageData& other); 34 ImageData(const ImageData& other);
34 ~ImageData(); 35 ~ImageData();
35 skia::RefPtr<const SkImage> image; 36 sk_sp<const SkImage> image;
36 gfx::Point point; 37 gfx::Point point;
37 gfx::Transform transform; 38 gfx::Transform transform;
38 SkPaint paint; 39 SkPaint paint;
39 }; 40 };
40 41
41 FakeContentLayerClient(); 42 FakeContentLayerClient();
42 ~FakeContentLayerClient() override; 43 ~FakeContentLayerClient() override;
43 44
44 gfx::Rect PaintableRegion() override; 45 gfx::Rect PaintableRegion() override;
45 scoped_refptr<DisplayItemList> PaintContentsToDisplayList( 46 scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 SkCanvas* last_canvas_; 104 SkCanvas* last_canvas_;
104 PaintingControlSetting last_painting_control_; 105 PaintingControlSetting last_painting_control_;
105 size_t reported_memory_usage_; 106 size_t reported_memory_usage_;
106 gfx::Size bounds_; 107 gfx::Size bounds_;
107 bool bounds_set_; 108 bool bounds_set_;
108 }; 109 };
109 110
110 } // namespace cc 111 } // namespace cc
111 112
112 #endif // CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ 113 #endif // CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698