OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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/output_surface.h" | 5 #include "cc/output/output_surface.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 scoped_ptr<cc::SoftwareOutputDevice> software_device) | 64 scoped_ptr<cc::SoftwareOutputDevice> software_device) |
65 : client_(NULL), | 65 : client_(NULL), |
66 context3d_(context3d.Pass()), | 66 context3d_(context3d.Pass()), |
67 software_device_(software_device.Pass()), | 67 software_device_(software_device.Pass()), |
68 has_gl_discard_backbuffer_(false) { | 68 has_gl_discard_backbuffer_(false) { |
69 } | 69 } |
70 | 70 |
71 OutputSurface::~OutputSurface() { | 71 OutputSurface::~OutputSurface() { |
72 } | 72 } |
73 | 73 |
| 74 bool OutputSurface::ForcedDrawToSoftwareDevice() const { |
| 75 return false; |
| 76 } |
| 77 |
74 bool OutputSurface::BindToClient( | 78 bool OutputSurface::BindToClient( |
75 cc::OutputSurfaceClient* client) { | 79 cc::OutputSurfaceClient* client) { |
76 DCHECK(client); | 80 DCHECK(client); |
77 client_ = client; | 81 client_ = client; |
78 if (!context3d_) | 82 if (!context3d_) |
79 return true; | 83 return true; |
80 if (!context3d_->makeContextCurrent()) | 84 if (!context3d_->makeContextCurrent()) |
81 return false; | 85 return false; |
82 | 86 |
83 string extensions_string = UTF16ToASCII(context3d_->getString(GL_EXTENSIONS)); | 87 string extensions_string = UTF16ToASCII(context3d_->getString(GL_EXTENSIONS)); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 } | 133 } |
130 | 134 |
131 void OutputSurface::PostSubBuffer(gfx::Rect rect, | 135 void OutputSurface::PostSubBuffer(gfx::Rect rect, |
132 const LatencyInfo& latency_info) { | 136 const LatencyInfo& latency_info) { |
133 DCHECK(context3d_); | 137 DCHECK(context3d_); |
134 context3d_->postSubBufferCHROMIUM( | 138 context3d_->postSubBufferCHROMIUM( |
135 rect.x(), rect.y(), rect.width(), rect.height()); | 139 rect.x(), rect.y(), rect.width(), rect.height()); |
136 } | 140 } |
137 | 141 |
138 } // namespace cc | 142 } // namespace cc |
OLD | NEW |