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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 scoped_ptr<cc::SoftwareOutputDevice> software_device) | 61 scoped_ptr<cc::SoftwareOutputDevice> software_device) |
62 : client_(NULL), | 62 : client_(NULL), |
63 context3d_(context3d.Pass()), | 63 context3d_(context3d.Pass()), |
64 software_device_(software_device.Pass()), | 64 software_device_(software_device.Pass()), |
65 has_gl_discard_backbuffer_(false) { | 65 has_gl_discard_backbuffer_(false) { |
66 } | 66 } |
67 | 67 |
68 OutputSurface::~OutputSurface() { | 68 OutputSurface::~OutputSurface() { |
69 } | 69 } |
70 | 70 |
| 71 bool OutputSurface::ForcedDrawToSoftwareDevice() const { |
| 72 return false; |
| 73 } |
| 74 |
71 bool OutputSurface::BindToClient( | 75 bool OutputSurface::BindToClient( |
72 cc::OutputSurfaceClient* client) { | 76 cc::OutputSurfaceClient* client) { |
73 DCHECK(client); | 77 DCHECK(client); |
74 client_ = client; | 78 client_ = client; |
75 if (!context3d_) | 79 if (!context3d_) |
76 return true; | 80 return true; |
77 if (!context3d_->makeContextCurrent()) | 81 if (!context3d_->makeContextCurrent()) |
78 return false; | 82 return false; |
79 | 83 |
80 string extensions_string = UTF16ToASCII(context3d_->getString(GL_EXTENSIONS)); | 84 string extensions_string = UTF16ToASCII(context3d_->getString(GL_EXTENSIONS)); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 } | 130 } |
127 | 131 |
128 void OutputSurface::PostSubBuffer(gfx::Rect rect, | 132 void OutputSurface::PostSubBuffer(gfx::Rect rect, |
129 const LatencyInfo& latency_info) { | 133 const LatencyInfo& latency_info) { |
130 DCHECK(context3d_); | 134 DCHECK(context3d_); |
131 context3d_->postSubBufferCHROMIUM( | 135 context3d_->postSubBufferCHROMIUM( |
132 rect.x(), rect.y(), rect.width(), rect.height()); | 136 rect.x(), rect.y(), rect.width(), rect.height()); |
133 } | 137 } |
134 | 138 |
135 } // namespace cc | 139 } // namespace cc |
OLD | NEW |