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

Side by Side Diff: content/browser/compositor/software_output_device_win.cc

Issue 1125193004: Simplify accelerated paint and remove windows CanvasSkiaPaint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | ui/gfx/BUILD.gn » ('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 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 "content/browser/compositor/software_output_device_win.h" 5 #include "content/browser/compositor/software_output_device_win.h"
6 6
7 #include "content/public/browser/browser_thread.h" 7 #include "content/public/browser/browser_thread.h"
8 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
9 #include "third_party/skia/include/core/SkDevice.h" 9 #include "third_party/skia/include/core/SkDevice.h"
10 #include "ui/compositor/compositor.h" 10 #include "ui/compositor/compositor.h"
11 #include "ui/gfx/canvas.h" 11 #include "ui/gfx/canvas.h"
12 #include "ui/gfx/canvas_skia_paint.h"
13 #include "ui/gfx/gdi_util.h" 12 #include "ui/gfx/gdi_util.h"
14 #include "ui/gfx/skia_util.h" 13 #include "ui/gfx/skia_util.h"
15 14
16 namespace content { 15 namespace content {
17 16
18 SoftwareOutputDeviceWin::SoftwareOutputDeviceWin(ui::Compositor* compositor) 17 SoftwareOutputDeviceWin::SoftwareOutputDeviceWin(ui::Compositor* compositor)
19 : hwnd_(compositor->widget()), 18 : hwnd_(compositor->widget()),
20 is_hwnd_composited_(false) { 19 is_hwnd_composited_(false) {
21 // TODO(skaslev) Remove this when crbug.com/180702 is fixed. 20 // TODO(skaslev) Remove this when crbug.com/180702 is fixed.
22 DCHECK_CURRENTLY_ON(BrowserThread::UI); 21 DCHECK_CURRENTLY_ON(BrowserThread::UI);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 97
99 void SoftwareOutputDeviceWin::CopyToPixels(const gfx::Rect& rect, 98 void SoftwareOutputDeviceWin::CopyToPixels(const gfx::Rect& rect,
100 void* pixels) { 99 void* pixels) {
101 DCHECK(contents_); 100 DCHECK(contents_);
102 SkImageInfo info = SkImageInfo::MakeN32Premul(rect.width(), rect.height()); 101 SkImageInfo info = SkImageInfo::MakeN32Premul(rect.width(), rect.height());
103 contents_->sk_canvas()->readPixels( 102 contents_->sk_canvas()->readPixels(
104 info, pixels, info.minRowBytes(), rect.x(), rect.y()); 103 info, pixels, info.minRowBytes(), rect.x(), rect.y());
105 } 104 }
106 105
107 } // namespace content 106 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698