| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 }; | 294 }; |
| 295 | 295 |
| 296 gpu::gles2::GLES2Interface* gl_; | 296 gpu::gles2::GLES2Interface* gl_; |
| 297 unsigned query_id_; | 297 unsigned query_id_; |
| 298 bool is_pending_; | 298 bool is_pending_; |
| 299 base::WeakPtrFactory<SyncQuery> weak_ptr_factory_; | 299 base::WeakPtrFactory<SyncQuery> weak_ptr_factory_; |
| 300 | 300 |
| 301 DISALLOW_COPY_AND_ASSIGN(SyncQuery); | 301 DISALLOW_COPY_AND_ASSIGN(SyncQuery); |
| 302 }; | 302 }; |
| 303 | 303 |
| 304 std::unique_ptr<GLRenderer> GLRenderer::Create( | |
| 305 RendererClient* client, | |
| 306 const RendererSettings* settings, | |
| 307 OutputSurface* output_surface, | |
| 308 ResourceProvider* resource_provider, | |
| 309 TextureMailboxDeleter* texture_mailbox_deleter, | |
| 310 int highp_threshold_min) { | |
| 311 return base::WrapUnique( | |
| 312 new GLRenderer(client, settings, output_surface, resource_provider, | |
| 313 texture_mailbox_deleter, highp_threshold_min)); | |
| 314 } | |
| 315 | |
| 316 GLRenderer::GLRenderer(RendererClient* client, | 304 GLRenderer::GLRenderer(RendererClient* client, |
| 317 const RendererSettings* settings, | 305 const RendererSettings* settings, |
| 318 OutputSurface* output_surface, | 306 OutputSurface* output_surface, |
| 319 ResourceProvider* resource_provider, | 307 ResourceProvider* resource_provider, |
| 320 TextureMailboxDeleter* texture_mailbox_deleter, | 308 TextureMailboxDeleter* texture_mailbox_deleter, |
| 321 int highp_threshold_min) | 309 int highp_threshold_min) |
| 322 : DirectRenderer(client, settings, output_surface, resource_provider), | 310 : DirectRenderer(client, settings, output_surface, resource_provider), |
| 323 offscreen_framebuffer_id_(0), | 311 offscreen_framebuffer_id_(0), |
| 324 shared_geometry_quad_(QuadVertexRect()), | 312 shared_geometry_quad_(QuadVertexRect()), |
| 325 gl_(output_surface->context_provider()->ContextGL()), | 313 gl_(output_surface->context_provider()->ContextGL()), |
| (...skipping 3451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3777 resource_provider_, contents_texture->id())); | 3765 resource_provider_, contents_texture->id())); |
| 3778 source_texture = source->texture_id(); | 3766 source_texture = source->texture_id(); |
| 3779 } | 3767 } |
| 3780 gl_->CopySubTextureCHROMIUM(source_texture, destination.texture_id(), 0, 0, 0, | 3768 gl_->CopySubTextureCHROMIUM(source_texture, destination.texture_id(), 0, 0, 0, |
| 3781 0, contents_texture->size().width(), | 3769 0, contents_texture->size().width(), |
| 3782 contents_texture->size().height(), GL_TRUE, | 3770 contents_texture->size().height(), GL_TRUE, |
| 3783 GL_FALSE, GL_FALSE); | 3771 GL_FALSE, GL_FALSE); |
| 3784 } | 3772 } |
| 3785 | 3773 |
| 3786 } // namespace cc | 3774 } // namespace cc |
| OLD | NEW |