Chromium Code Reviews| 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 "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include <stdio.h> | 7 #include <stdio.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <list> | 10 #include <list> |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 51 #include "gpu/command_buffer/service/shader_translator.h" | 51 #include "gpu/command_buffer/service/shader_translator.h" |
| 52 #include "gpu/command_buffer/service/shader_translator_cache.h" | 52 #include "gpu/command_buffer/service/shader_translator_cache.h" |
| 53 #include "gpu/command_buffer/service/stream_texture.h" | 53 #include "gpu/command_buffer/service/stream_texture.h" |
| 54 #include "gpu/command_buffer/service/stream_texture_manager.h" | 54 #include "gpu/command_buffer/service/stream_texture_manager.h" |
| 55 #include "gpu/command_buffer/service/texture_definition.h" | 55 #include "gpu/command_buffer/service/texture_definition.h" |
| 56 #include "gpu/command_buffer/service/texture_manager.h" | 56 #include "gpu/command_buffer/service/texture_manager.h" |
| 57 #include "gpu/command_buffer/service/vertex_attrib_manager.h" | 57 #include "gpu/command_buffer/service/vertex_attrib_manager.h" |
| 58 #include "gpu/command_buffer/service/vertex_array_manager.h" | 58 #include "gpu/command_buffer/service/vertex_array_manager.h" |
| 59 #include "ui/gl/async_pixel_transfer_delegate.h" | 59 #include "ui/gl/async_pixel_transfer_delegate.h" |
| 60 #include "ui/gl/gl_bindings.h" | 60 #include "ui/gl/gl_bindings.h" |
| 61 #if defined(OS_MACOSX) | |
|
jbauman
2013/04/06 01:52:02
Put this at the end of the list (with a blank line
ccameron
2013/04/08 17:25:14
Done. There were lots of instances of this in the
| |
| 62 #include "ui/gl/gl_context_cgl.h" | |
| 63 #endif | |
| 61 #include "ui/gl/gl_image.h" | 64 #include "ui/gl/gl_image.h" |
| 62 #include "ui/gl/gl_implementation.h" | 65 #include "ui/gl/gl_implementation.h" |
| 63 #include "ui/gl/gl_surface.h" | 66 #include "ui/gl/gl_surface.h" |
| 64 #if defined(OS_MACOSX) | 67 #if defined(OS_MACOSX) |
| 65 #include "ui/surface/io_surface_support_mac.h" | 68 #include "ui/surface/io_surface_support_mac.h" |
| 66 #endif | 69 #endif |
| 67 | 70 |
| 68 // TODO(zmo): we can't include "City.h" due to type def conflicts. | 71 // TODO(zmo): we can't include "City.h" due to type def conflicts. |
| 69 extern uint64 CityHash64(const char*, size_t); | 72 extern uint64 CityHash64(const char*, size_t); |
| 70 | 73 |
| (...skipping 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2566 | 2569 |
| 2567 DoBindBuffer(GL_ARRAY_BUFFER, 0); | 2570 DoBindBuffer(GL_ARRAY_BUFFER, 0); |
| 2568 DoBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); | 2571 DoBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); |
| 2569 DoBindFramebuffer(GL_FRAMEBUFFER, 0); | 2572 DoBindFramebuffer(GL_FRAMEBUFFER, 0); |
| 2570 DoBindRenderbuffer(GL_RENDERBUFFER, 0); | 2573 DoBindRenderbuffer(GL_RENDERBUFFER, 0); |
| 2571 | 2574 |
| 2572 if (feature_info_->workarounds().reverse_point_sprite_coord_origin) { | 2575 if (feature_info_->workarounds().reverse_point_sprite_coord_origin) { |
| 2573 glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT); | 2576 glPointParameteri(GL_POINT_SPRITE_COORD_ORIGIN, GL_LOWER_LEFT); |
| 2574 } | 2577 } |
| 2575 | 2578 |
| 2579 #if defined(OS_MACOSX) | |
| 2580 if (feature_info_->workarounds().force_cgl_set_virtual_screen) | |
| 2581 gfx::GLContextCGL::ForceCGLSetVirtualScreen(); | |
| 2582 #endif | |
| 2583 | |
| 2576 // Create a delegate to perform async pixel transfers. | 2584 // Create a delegate to perform async pixel transfers. |
| 2577 async_pixel_transfer_delegate_ = | 2585 async_pixel_transfer_delegate_ = |
| 2578 gfx::AsyncPixelTransferDelegate::Create(context.get()); | 2586 gfx::AsyncPixelTransferDelegate::Create(context.get()); |
| 2579 | 2587 |
| 2580 return true; | 2588 return true; |
| 2581 } | 2589 } |
| 2582 | 2590 |
| 2583 void GLES2DecoderImpl::UpdateCapabilities() { | 2591 void GLES2DecoderImpl::UpdateCapabilities() { |
| 2584 util_.set_num_compressed_texture_formats( | 2592 util_.set_num_compressed_texture_formats( |
| 2585 validators_->compressed_texture_format.GetValues().size()); | 2593 validators_->compressed_texture_format.GetValues().size()); |
| (...skipping 7939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10525 return error::kNoError; | 10533 return error::kNoError; |
| 10526 } | 10534 } |
| 10527 | 10535 |
| 10528 // Include the auto-generated part of this file. We split this because it means | 10536 // Include the auto-generated part of this file. We split this because it means |
| 10529 // we can easily edit the non-auto generated parts right here in this file | 10537 // we can easily edit the non-auto generated parts right here in this file |
| 10530 // instead of having to edit some template or the code generator. | 10538 // instead of having to edit some template or the code generator. |
| 10531 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10539 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 10532 | 10540 |
| 10533 } // namespace gles2 | 10541 } // namespace gles2 |
| 10534 } // namespace gpu | 10542 } // namespace gpu |
| OLD | NEW |