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

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

Issue 1869753003: Replace many skia::RefPtr with sk_sp<> in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Florin's nits Created 4 years, 7 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
« no previous file with comments | « cc/resources/ui_resource_bitmap.cc ('k') | cc/test/solid_color_content_layer_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "cc/test/fake_content_layer_client.h" 5 #include "cc/test/fake_content_layer_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/playback/clip_display_item.h" 9 #include "cc/playback/clip_display_item.h"
10 #include "cc/playback/display_item_list_settings.h" 10 #include "cc/playback/display_item_list_settings.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 SkPaint paint; 94 SkPaint paint;
95 paint.setColor(red ? SK_ColorRED : SK_ColorBLUE); 95 paint.setColor(red ? SK_ColorRED : SK_ColorBLUE);
96 canvas = sk_ref_sp(recorder.beginRecording(gfx::RectToSkRect(draw_rect))); 96 canvas = sk_ref_sp(recorder.beginRecording(gfx::RectToSkRect(draw_rect)));
97 canvas->drawIRect(gfx::RectToSkIRect(draw_rect), paint); 97 canvas->drawIRect(gfx::RectToSkIRect(draw_rect), paint);
98 display_list->CreateAndAppendItem<DrawingDisplayItem>( 98 display_list->CreateAndAppendItem<DrawingDisplayItem>(
99 draw_rect, recorder.finishRecordingAsPicture()); 99 draw_rect, recorder.finishRecordingAsPicture());
100 draw_rect.Inset(1, 1); 100 draw_rect.Inset(1, 1);
101 } 101 }
102 } 102 }
103 103
104
105 display_list->Finalize(); 104 display_list->Finalize();
106 return display_list; 105 return display_list;
107 } 106 }
108 107
109 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; } 108 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; }
110 109
111 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const { 110 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const {
112 return reported_memory_usage_; 111 return reported_memory_usage_;
113 } 112 }
114 113
115 } // namespace cc 114 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/ui_resource_bitmap.cc ('k') | cc/test/solid_color_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698