| OLD | NEW |
| 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 Loading... |
| 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(PaintImage::GetNextId(), it->image), | 74 canvas->drawImage(PaintImage(it->image), it->point.x(), it->point.y(), |
| 75 it->point.x(), it->point.y(), &it->flags); | 75 &it->flags); |
| 76 display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>( | 76 display_list->CreateAndAppendDrawingItem<DrawingDisplayItem>( |
| 77 PaintableRegion(), recorder.finishRecordingAsPicture()); | 77 PaintableRegion(), recorder.finishRecordingAsPicture()); |
| 78 if (!it->transform.IsIdentity()) { | 78 if (!it->transform.IsIdentity()) { |
| 79 display_list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>(); | 79 display_list->CreateAndAppendPairedEndItem<EndTransformDisplayItem>(); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 | 82 |
| 83 if (fill_with_nonsolid_color_) { | 83 if (fill_with_nonsolid_color_) { |
| 84 gfx::Rect draw_rect = PaintableRegion(); | 84 gfx::Rect draw_rect = PaintableRegion(); |
| 85 bool red = true; | 85 bool red = true; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 99 return display_list; | 99 return display_list; |
| 100 } | 100 } |
| 101 | 101 |
| 102 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; } | 102 bool FakeContentLayerClient::FillsBoundsCompletely() const { return false; } |
| 103 | 103 |
| 104 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const { | 104 size_t FakeContentLayerClient::GetApproximateUnsharedMemoryUsage() const { |
| 105 return reported_memory_usage_; | 105 return reported_memory_usage_; |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace cc | 108 } // namespace cc |
| OLD | NEW |