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

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

Issue 2835373003: Plumb PaintImage to the PictureImageLayer. (Closed)
Patch Set: update Created 3 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/paint/paint_image.cc ('k') | cc/trees/layer_tree_host_pixeltest_blending.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(PaintImage(it->image, PaintImage::AnimationType::STATIC, 74 canvas->drawImage(PaintImage(it->image), it->point.x(), it->point.y(),
75 PaintImage::CompletionState::DONE), 75 &it->flags);
76 it->point.x(), it->point.y(), &it->flags);
77 display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>( 76 display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>(
78 PaintableRegion(), recorder.finishRecordingAsPicture()); 77 PaintableRegion(), recorder.finishRecordingAsPicture());
79 if (!it->transform.IsIdentity()) { 78 if (!it->transform.IsIdentity()) {
80 display_list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>(); 79 display_list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>();
81 } 80 }
82 } 81 }
83 82
84 if (fill_with_nonsolid_color_) { 83 if (fill_with_nonsolid_color_) {
85 gfx::Rect draw_rect = PaintableRegion(); 84 gfx::Rect draw_rect = PaintableRegion();
86 bool red = true; 85 bool red = true;
(...skipping 13 matching lines...) Expand all
100 return display_list; 99 return display_list;
101 } 100 }
102 101
103 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; } 102 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; }
104 103
105 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const { 104 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const {
106 return reported_memory_usage_; 105 return reported_memory_usage_;
107 } 106 }
108 107
109 } // namespace cc 108 } // namespace cc
OLDNEW
« no previous file with comments | « cc/paint/paint_image.cc ('k') | cc/trees/layer_tree_host_pixeltest_blending.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698