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

Side by Side Diff: cc/output_surface_impl.cc

Issue 11967033: [CLOSED] In-browser software compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the lack SkCanvas::clear scissoring. Created 7 years, 11 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_surface_impl.h ('k') | cc/software_output_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 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 #include "cc/output_surface_impl.h"
6
7 #include "base/logging.h"
8 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h"
9
10 namespace cc {
11
12 OutputSurfaceImpl::OutputSurfaceImpl(
13 scoped_ptr<WebKit::WebGraphicsContext3D> context3d)
14 : client_(NULL),
15 context3d_(context3d.Pass()) {
16 }
17
18 OutputSurfaceImpl::OutputSurfaceImpl(
19 scoped_ptr<cc::SoftwareOutputDevice> software_device)
20 : client_(NULL),
21 software_device_(software_device.Pass()) {
22 }
23
24 OutputSurfaceImpl::OutputSurfaceImpl(
25 scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
26 scoped_ptr<cc::SoftwareOutputDevice> software_device)
27 : client_(NULL),
28 context3d_(context3d.Pass()),
29 software_device_(software_device.Pass()) {
30 }
31
32 OutputSurfaceImpl::~OutputSurfaceImpl() {}
33
34 bool OutputSurfaceImpl::BindToClient(
35 cc::OutputSurfaceClient* client) {
36 DCHECK(client);
37 if (!context3d_)
38 return true;
39 client_ = client;
40 return context3d_->makeContextCurrent();
41 }
42
43 const struct cc::OutputSurface::Capabilities&
44 OutputSurfaceImpl::Capabilities() const {
45 return capabilities_;
46 }
47
48 WebKit::WebGraphicsContext3D* OutputSurfaceImpl::Context3D() const {
49 return context3d_.get();
50 }
51
52 cc::SoftwareOutputDevice* OutputSurfaceImpl::SoftwareDevice() const {
53 return software_device_.get();
54 }
55
56 void OutputSurfaceImpl::SendFrameToParentCompositor(
57 cc::CompositorFrame*) {
58 }
59
60 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output_surface_impl.h ('k') | cc/software_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698