Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/playback/raster_source_helper.h" | 5 #include "cc/playback/raster_source_helper.h" |
| 6 | 6 |
| 7 #include "base/trace_event/trace_event.h" | 7 #include "base/trace_event/trace_event.h" |
| 8 #include "cc/debug/debug_colors.h" | 8 #include "cc/debug/debug_colors.h" |
| 9 #include "third_party/skia/include/core/SkCanvas.h" | 9 #include "third_party/skia/include/core/SkCanvas.h" |
| 10 #include "ui/gfx/geometry/rect_conversions.h" | 10 #include "ui/gfx/geometry/rect_conversions.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 SkXfermode::kSrc_Mode); | 81 SkXfermode::kSrc_Mode); |
| 82 canvas->restore(); | 82 canvas->restore(); |
| 83 } | 83 } |
| 84 | 84 |
| 85 // Drawing at most 2 x 2 x (canvas width + canvas height) texels is 2-3X | 85 // Drawing at most 2 x 2 x (canvas width + canvas height) texels is 2-3X |
| 86 // faster than clearing, so special case this. | 86 // faster than clearing, so special case this. |
| 87 canvas->save(); | 87 canvas->save(); |
| 88 canvas->translate(-canvas_bitmap_rect.x(), -canvas_bitmap_rect.y()); | 88 canvas->translate(-canvas_bitmap_rect.x(), -canvas_bitmap_rect.y()); |
| 89 gfx::Rect inflated_content_rect = content_rect; | 89 gfx::Rect inflated_content_rect = content_rect; |
| 90 inflated_content_rect.Inset(0, 0, -1, -1); | 90 inflated_content_rect.Inset(0, 0, -1, -1); |
| 91 LOG(ERROR) << content_rect.ToString(); | |
|
vmpstr
2015/06/03 18:31:20
Remove please.
danakj
2015/06/03 18:40:57
Done.
| |
| 92 LOG(ERROR) << inflated_content_rect.ToString(); | |
| 91 canvas->clipRect(gfx::RectToSkRect(inflated_content_rect), | 93 canvas->clipRect(gfx::RectToSkRect(inflated_content_rect), |
| 92 SkRegion::kReplace_Op); | 94 SkRegion::kReplace_Op); |
| 93 canvas->clipRect(gfx::RectToSkRect(deflated_content_rect), | 95 canvas->clipRect(gfx::RectToSkRect(deflated_content_rect), |
| 94 SkRegion::kDifference_Op); | 96 SkRegion::kDifference_Op); |
| 95 canvas->drawColor(background_color, SkXfermode::kSrc_Mode); | 97 canvas->drawColor(background_color, SkXfermode::kSrc_Mode); |
| 96 canvas->restore(); | 98 canvas->restore(); |
| 97 } | 99 } |
| 98 } | 100 } |
| 99 } | 101 } |
| 100 | 102 |
| 101 } // namespace cc | 103 } // namespace cc |
| OLD | NEW |