OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/renderer_host/backing_store.h" | 5 #include "chrome/browser/renderer_host/backing_store.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/common/transport_dib.h" | 8 #include "chrome/common/transport_dib.h" |
9 #include "skia/ext/platform_canvas.h" | 9 #include "skia/ext/platform_canvas.h" |
10 #include "skia/include/SkBitmap.h" | 10 #include "third_party/skia/include/core/SkBitmap.h" |
11 #include "skia/include/SkCanvas.h" | 11 #include "third_party/skia/include/core/SkCanvas.h" |
12 | 12 |
13 BackingStore::BackingStore(const gfx::Size& size) | 13 BackingStore::BackingStore(const gfx::Size& size) |
14 : size_(size) { | 14 : size_(size) { |
15 if (!canvas_.initialize(size.width(), size.height(), true)) | 15 if (!canvas_.initialize(size.width(), size.height(), true)) |
16 SK_CRASH(); | 16 SK_CRASH(); |
17 } | 17 } |
18 | 18 |
19 BackingStore::~BackingStore() { | 19 BackingStore::~BackingStore() { |
20 } | 20 } |
21 | 21 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 memcpy(x, x + stride * dy, len); | 113 memcpy(x, x + stride * dy, len); |
114 x -= stride; | 114 x -= stride; |
115 } | 115 } |
116 } | 116 } |
117 } | 117 } |
118 | 118 |
119 // Now paint the new bitmap data. | 119 // Now paint the new bitmap data. |
120 PaintRect(process, bitmap, bitmap_rect); | 120 PaintRect(process, bitmap, bitmap_rect); |
121 return; | 121 return; |
122 } | 122 } |
OLD | NEW |