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

Side by Side Diff: content/browser/compositor/software_output_device_mac.mm

Issue 297573003: Make delegated software renderer work on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebas Created 6 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #import <Cocoa/Cocoa.h>
6
7 #include "content/browser/compositor/software_output_device_mac.h"
8
9 #include "ui/compositor/compositor.h"
10
11 // Declare methods used to present swaps to this view.
12 @interface NSView (SoftwareDelegatedFrame)
13 - (void)gotSoftwareFrame:(cc::SoftwareFrameData*)frame_data
14 withScaleFactor:(float)scale_factor
15 withCanvas:(SkCanvas*)canvas;
16 @end
17
18 @implementation NSView (SoftwareDelegatedFrame)
19 - (void)gotSoftwareFrame:(cc::SoftwareFrameData*)frame_data
20 withScaleFactor:(float)scale_factor
21 withCanvas:(SkCanvas*)canvas {
22 }
23 @end
24
25 namespace content {
26
27 SoftwareOutputDeviceMac::SoftwareOutputDeviceMac(ui::Compositor* compositor)
28 : compositor_(compositor) {
29 }
30
31 SoftwareOutputDeviceMac::~SoftwareOutputDeviceMac() {
32 }
33
34 void SoftwareOutputDeviceMac::EndPaint(cc::SoftwareFrameData* frame_data) {
35 SoftwareOutputDevice::EndPaint(frame_data);
36
37 NSView* view = compositor_->widget();
38 [view gotSoftwareFrame:frame_data
39 withScaleFactor:scale_factor_
40 withCanvas:canvas_.get()];
41 }
42
43 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/compositor/software_output_device_mac.h ('k') | content/browser/compositor/software_output_device_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698