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

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

Issue 2743363006: Clean up cc/paint interfaces (Closed)
Patch Set: Fix PaintControllerTest v2 Created 3 years, 9 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/paint/skia_paint_canvas.cc ('k') | media/renderers/skcanvas_video_renderer.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/paint/clip_display_item.h" 9 #include "cc/paint/clip_display_item.h"
10 #include "cc/paint/drawing_display_item.h" 10 #include "cc/paint/drawing_display_item.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 64 }
65 65
66 for (ImageVector::const_iterator it = draw_images_.begin(); 66 for (ImageVector::const_iterator it = draw_images_.begin();
67 it != draw_images_.end(); ++it) { 67 it != draw_images_.end(); ++it) {
68 if (!it->transform.IsIdentity()) { 68 if (!it->transform.IsIdentity()) {
69 display_list->CreateAndAppendPairedBeginItem<TransformDisplayItem>( 69 display_list->CreateAndAppendPairedBeginItem<TransformDisplayItem>(
70 it->transform); 70 it->transform);
71 } 71 }
72 PaintCanvas* canvas = 72 PaintCanvas* canvas =
73 recorder.beginRecording(it->image->width(), it->image->height()); 73 recorder.beginRecording(it->image->width(), it->image->height());
74 canvas->drawImage(it->image.get(), it->point.x(), it->point.y(), 74 canvas->drawImage(it->image, it->point.x(), it->point.y(), &it->flags);
75 &it->flags);
76 display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>( 75 display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
77 PaintableRegion(), recorder.finishRecordingAsPicture()); 76 PaintableRegion(), recorder.finishRecordingAsPicture());
78 if (!it->transform.IsIdentity()) { 77 if (!it->transform.IsIdentity()) {
79 display_list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>(); 78 display_list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>();
80 } 79 }
81 } 80 }
82 81
83 if (fill_with_nonsolid_color_) { 82 if (fill_with_nonsolid_color_) {
84 gfx::Rect draw_rect = PaintableRegion(); 83 gfx::Rect draw_rect = PaintableRegion();
85 bool red = true; 84 bool red = true;
(...skipping 13 matching lines...) Expand all
99 return display_list; 98 return display_list;
100 } 99 }
101 100
102 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; } 101 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; }
103 102
104 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const { 103 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const {
105 return reported_memory_usage_; 104 return reported_memory_usage_;
106 } 105 }
107 106
108 } // namespace cc 107 } // namespace cc
OLDNEW
« no previous file with comments | « cc/paint/skia_paint_canvas.cc ('k') | media/renderers/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698