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

Side by Side Diff: cc/output/software_output_device.cc

Issue 22796028: Updating Chromium to Skia SkBaseDevice/SkBitmapDevice split (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODOs Created 7 years, 3 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/output/software_output_device.h ('k') | cc/output/software_renderer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/output/software_output_device.h" 5 #include "cc/output/software_output_device.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/output/software_frame_data.h" 8 #include "cc/output/software_frame_data.h"
9 #include "third_party/skia/include/core/SkBitmapDevice.h"
9 #include "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "third_party/skia/include/core/SkDevice.h"
11 #include "ui/gfx/skia_util.h" 11 #include "ui/gfx/skia_util.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 SoftwareOutputDevice::SoftwareOutputDevice() {} 15 SoftwareOutputDevice::SoftwareOutputDevice() {}
16 16
17 SoftwareOutputDevice::~SoftwareOutputDevice() {} 17 SoftwareOutputDevice::~SoftwareOutputDevice() {}
18 18
19 void SoftwareOutputDevice::Resize(gfx::Size viewport_size) { 19 void SoftwareOutputDevice::Resize(gfx::Size viewport_size) {
20 if (viewport_size_ == viewport_size) 20 if (viewport_size_ == viewport_size)
21 return; 21 return;
22 22
23 viewport_size_ = viewport_size; 23 viewport_size_ = viewport_size;
24 device_ = skia::AdoptRef(new SkDevice(SkBitmap::kARGB_8888_Config, 24 device_ = skia::AdoptRef(new SkBitmapDevice(SkBitmap::kARGB_8888_Config,
25 viewport_size.width(), viewport_size.height(), true)); 25 viewport_size.width(), viewport_size.height(), true));
26 canvas_ = skia::AdoptRef(new SkCanvas(device_.get())); 26 canvas_ = skia::AdoptRef(new SkCanvas(device_.get()));
27 } 27 }
28 28
29 SkCanvas* SoftwareOutputDevice::BeginPaint(gfx::Rect damage_rect) { 29 SkCanvas* SoftwareOutputDevice::BeginPaint(gfx::Rect damage_rect) {
30 DCHECK(device_); 30 DCHECK(device_);
31 damage_rect_ = damage_rect; 31 damage_rect_ = damage_rect;
32 return canvas_.get(); 32 return canvas_.get();
33 } 33 }
34 34
(...skipping 15 matching lines...) Expand all
50 void SoftwareOutputDevice::Scroll( 50 void SoftwareOutputDevice::Scroll(
51 gfx::Vector2d delta, gfx::Rect clip_rect) { 51 gfx::Vector2d delta, gfx::Rect clip_rect) {
52 NOTIMPLEMENTED(); 52 NOTIMPLEMENTED();
53 } 53 }
54 54
55 void SoftwareOutputDevice::ReclaimSoftwareFrame(unsigned id) { 55 void SoftwareOutputDevice::ReclaimSoftwareFrame(unsigned id) {
56 NOTIMPLEMENTED(); 56 NOTIMPLEMENTED();
57 } 57 }
58 58
59 } // namespace cc 59 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/software_output_device.h ('k') | cc/output/software_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698