OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "webkit/common/gpu/webgraphicscontext3d_in_process_impl.h" | 5 #include "webkit/common/gpu/webgraphicscontext3d_in_process_impl.h" |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 } | 272 } |
273 | 273 |
274 int WebGraphicsContext3DInProcessImpl::width() { | 274 int WebGraphicsContext3DInProcessImpl::width() { |
275 return cached_width_; | 275 return cached_width_; |
276 } | 276 } |
277 | 277 |
278 int WebGraphicsContext3DInProcessImpl::height() { | 278 int WebGraphicsContext3DInProcessImpl::height() { |
279 return cached_height_; | 279 return cached_height_; |
280 } | 280 } |
281 | 281 |
282 bool WebGraphicsContext3DInProcessImpl::isGLES2Compliant() { | |
283 return is_gles2_; | |
284 } | |
285 | |
286 bool WebGraphicsContext3DInProcessImpl::setParentContext( | 282 bool WebGraphicsContext3DInProcessImpl::setParentContext( |
287 WebGraphicsContext3D* parent_context) { | 283 WebGraphicsContext3D* parent_context) { |
288 return false; | 284 return false; |
289 } | 285 } |
290 | 286 |
291 WebGLId WebGraphicsContext3DInProcessImpl::getPlatformTextureId() { | |
292 return texture_; | |
293 } | |
294 | |
295 void WebGraphicsContext3DInProcessImpl::prepareTexture() { | 287 void WebGraphicsContext3DInProcessImpl::prepareTexture() { |
296 if (!gl_surface_->IsOffscreen()) { | 288 if (!gl_surface_->IsOffscreen()) { |
297 gl_surface_->SwapBuffers(); | 289 gl_surface_->SwapBuffers(); |
298 } else if (!render_directly_to_web_view_) { | 290 } else if (!render_directly_to_web_view_) { |
299 // We need to prepare our rendering results for the compositor. | 291 // We need to prepare our rendering results for the compositor. |
300 makeContextCurrent(); | 292 makeContextCurrent(); |
301 ResolveMultisampledFramebuffer(0, 0, cached_width_, cached_height_); | 293 ResolveMultisampledFramebuffer(0, 0, cached_width_, cached_height_); |
302 } | 294 } |
303 } | 295 } |
304 | 296 |
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 if (length > 1) { | 1796 if (length > 1) { |
1805 entry->translated_source.reset(new char[length]); | 1797 entry->translated_source.reset(new char[length]); |
1806 ShGetObjectCode(compiler, entry->translated_source.get()); | 1798 ShGetObjectCode(compiler, entry->translated_source.get()); |
1807 } | 1799 } |
1808 entry->is_valid = true; | 1800 entry->is_valid = true; |
1809 return true; | 1801 return true; |
1810 } | 1802 } |
1811 | 1803 |
1812 } // namespace gpu | 1804 } // namespace gpu |
1813 } // namespace webkit | 1805 } // namespace webkit |
OLD | NEW |