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

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

Issue 13248003: Pass a sequence number along with the DIB handle when compositing in software. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« 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/SkCanvas.h" 9 #include "third_party/skia/include/core/SkCanvas.h"
10 #include "third_party/skia/include/core/SkDevice.h" 10 #include "third_party/skia/include/core/SkDevice.h"
(...skipping 16 matching lines...) Expand all
27 27
28 SkCanvas* SoftwareOutputDevice::BeginPaint(gfx::Rect damage_rect) { 28 SkCanvas* SoftwareOutputDevice::BeginPaint(gfx::Rect damage_rect) {
29 DCHECK(device_); 29 DCHECK(device_);
30 damage_rect_ = damage_rect; 30 damage_rect_ = damage_rect;
31 return canvas_.get(); 31 return canvas_.get();
32 } 32 }
33 33
34 void SoftwareOutputDevice::EndPaint(SoftwareFrameData* frame_data) { 34 void SoftwareOutputDevice::EndPaint(SoftwareFrameData* frame_data) {
35 DCHECK(device_); 35 DCHECK(device_);
36 if (frame_data) { 36 if (frame_data) {
37 frame_data->size = viewport_size_;
37 frame_data->damage_rect = damage_rect_; 38 frame_data->damage_rect = damage_rect_;
38 frame_data->content_dib = TransportDIB::DefaultHandleValue(); 39 frame_data->dib_id = TransportDIB::Id();
39 } 40 }
40 } 41 }
41 42
42 void SoftwareOutputDevice::CopyToBitmap( 43 void SoftwareOutputDevice::CopyToBitmap(
43 gfx::Rect rect, SkBitmap* output) { 44 gfx::Rect rect, SkBitmap* output) {
44 DCHECK(device_); 45 DCHECK(device_);
45 SkIRect invert_rect = SkIRect::MakeXYWH( 46 SkIRect invert_rect = SkIRect::MakeXYWH(
46 rect.x(), viewport_size_.height() - rect.bottom(), 47 rect.x(), viewport_size_.height() - rect.bottom(),
47 rect.width(), rect.height()); 48 rect.width(), rect.height());
48 const SkBitmap& bitmap = device_->accessBitmap(false); 49 const SkBitmap& bitmap = device_->accessBitmap(false);
49 bitmap.extractSubset(output, invert_rect); 50 bitmap.extractSubset(output, invert_rect);
50 } 51 }
51 52
52 void SoftwareOutputDevice::Scroll( 53 void SoftwareOutputDevice::Scroll(
53 gfx::Vector2d delta, gfx::Rect clip_rect) { 54 gfx::Vector2d delta, gfx::Rect clip_rect) {
54 NOTIMPLEMENTED(); 55 NOTIMPLEMENTED();
55 } 56 }
56 57
57 void SoftwareOutputDevice::ReclaimDIB(TransportDIB::Handle handle) { 58 void SoftwareOutputDevice::ReclaimDIB(const TransportDIB::Id& id) {
58 NOTIMPLEMENTED(); 59 NOTIMPLEMENTED();
59 } 60 }
60 61
61 } // namespace cc 62 } // 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