| 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 <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 #include "gpu/command_buffer/service/shader_manager.h" | 61 #include "gpu/command_buffer/service/shader_manager.h" |
| 62 #include "gpu/command_buffer/service/shader_translator.h" | 62 #include "gpu/command_buffer/service/shader_translator.h" |
| 63 #include "gpu/command_buffer/service/texture_manager.h" | 63 #include "gpu/command_buffer/service/texture_manager.h" |
| 64 #include "gpu/command_buffer/service/transform_feedback_manager.h" | 64 #include "gpu/command_buffer/service/transform_feedback_manager.h" |
| 65 #include "gpu/command_buffer/service/vertex_array_manager.h" | 65 #include "gpu/command_buffer/service/vertex_array_manager.h" |
| 66 #include "gpu/command_buffer/service/vertex_attrib_manager.h" | 66 #include "gpu/command_buffer/service/vertex_attrib_manager.h" |
| 67 #include "third_party/smhasher/src/City.h" | 67 #include "third_party/smhasher/src/City.h" |
| 68 #include "ui/gfx/buffer_types.h" | 68 #include "ui/gfx/buffer_types.h" |
| 69 #include "ui/gfx/geometry/point.h" | 69 #include "ui/gfx/geometry/point.h" |
| 70 #include "ui/gfx/geometry/rect.h" | 70 #include "ui/gfx/geometry/rect.h" |
| 71 #include "ui/gfx/geometry/rect_conversions.h" | |
| 72 #include "ui/gfx/geometry/size.h" | 71 #include "ui/gfx/geometry/size.h" |
| 73 #include "ui/gfx/gpu_memory_buffer.h" | 72 #include "ui/gfx/gpu_memory_buffer.h" |
| 74 #include "ui/gfx/overlay_transform.h" | 73 #include "ui/gfx/overlay_transform.h" |
| 75 #include "ui/gfx/transform.h" | 74 #include "ui/gfx/transform.h" |
| 76 #include "ui/gl/ca_renderer_layer_params.h" | |
| 77 #include "ui/gl/gl_bindings.h" | 75 #include "ui/gl/gl_bindings.h" |
| 78 #include "ui/gl/gl_context.h" | 76 #include "ui/gl/gl_context.h" |
| 79 #include "ui/gl/gl_fence.h" | 77 #include "ui/gl/gl_fence.h" |
| 80 #include "ui/gl/gl_image.h" | 78 #include "ui/gl/gl_image.h" |
| 81 #include "ui/gl/gl_implementation.h" | 79 #include "ui/gl/gl_implementation.h" |
| 82 #include "ui/gl/gl_surface.h" | 80 #include "ui/gl/gl_surface.h" |
| 83 #include "ui/gl/gl_version_info.h" | 81 #include "ui/gl/gl_version_info.h" |
| 84 #include "ui/gl/gpu_timing.h" | 82 #include "ui/gl/gpu_timing.h" |
| 85 | 83 |
| 86 #if defined(OS_MACOSX) | 84 #if defined(OS_MACOSX) |
| (...skipping 10607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10694 if (!mem) { | 10692 if (!mem) { |
| 10695 return error::kOutOfBounds; | 10693 return error::kOutOfBounds; |
| 10696 } | 10694 } |
| 10697 gfx::RectF contents_rect(mem[0], mem[1], mem[2], mem[3]); | 10695 gfx::RectF contents_rect(mem[0], mem[1], mem[2], mem[3]); |
| 10698 gfx::RectF bounds_rect(mem[4], mem[5], mem[6], mem[7]); | 10696 gfx::RectF bounds_rect(mem[4], mem[5], mem[6], mem[7]); |
| 10699 gfx::RectF clip_rect(mem[8], mem[9], mem[10], mem[11]); | 10697 gfx::RectF clip_rect(mem[8], mem[9], mem[10], mem[11]); |
| 10700 gfx::Transform transform(mem[12], mem[16], mem[20], mem[24], | 10698 gfx::Transform transform(mem[12], mem[16], mem[20], mem[24], |
| 10701 mem[13], mem[17], mem[21], mem[25], | 10699 mem[13], mem[17], mem[21], mem[25], |
| 10702 mem[14], mem[18], mem[22], mem[26], | 10700 mem[14], mem[18], mem[22], mem[26], |
| 10703 mem[15], mem[19], mem[23], mem[27]); | 10701 mem[15], mem[19], mem[23], mem[27]); |
| 10704 | 10702 if (!surface_->ScheduleCALayer( |
| 10705 ui::CARendererLayerParams params = ui::CARendererLayerParams( | 10703 image, contents_rect, c.opacity, c.background_color, c.edge_aa_mask, |
| 10706 c.is_clipped ? true : false, gfx::ToEnclosingRect(clip_rect), | 10704 bounds_rect, c.is_clipped ? true : false, clip_rect, transform, |
| 10707 c.sorting_context_id, transform, image, contents_rect, | 10705 c.sorting_context_id, filter)) { |
| 10708 gfx::ToEnclosingRect(bounds_rect), c.background_color, c.edge_aa_mask, | |
| 10709 c.opacity, filter); | |
| 10710 if (!surface_->ScheduleCALayer(params)) { | |
| 10711 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glScheduleCALayerCHROMIUM", | 10706 LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, "glScheduleCALayerCHROMIUM", |
| 10712 "failed to schedule CALayer"); | 10707 "failed to schedule CALayer"); |
| 10713 } | 10708 } |
| 10714 return error::kNoError; | 10709 return error::kNoError; |
| 10715 } | 10710 } |
| 10716 | 10711 |
| 10717 void GLES2DecoderImpl::DoScheduleCALayerInUseQueryCHROMIUM( | 10712 void GLES2DecoderImpl::DoScheduleCALayerInUseQueryCHROMIUM( |
| 10718 GLsizei count, | 10713 GLsizei count, |
| 10719 const GLuint* textures) { | 10714 const GLuint* textures) { |
| 10720 std::vector<gl::GLSurface::CALayerInUseQuery> queries; | 10715 std::vector<gl::GLSurface::CALayerInUseQuery> queries; |
| (...skipping 6357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17078 } | 17073 } |
| 17079 | 17074 |
| 17080 // Include the auto-generated part of this file. We split this because it means | 17075 // Include the auto-generated part of this file. We split this because it means |
| 17081 // we can easily edit the non-auto generated parts right here in this file | 17076 // we can easily edit the non-auto generated parts right here in this file |
| 17082 // instead of having to edit some template or the code generator. | 17077 // instead of having to edit some template or the code generator. |
| 17083 #include "base/macros.h" | 17078 #include "base/macros.h" |
| 17084 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 17079 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 17085 | 17080 |
| 17086 } // namespace gles2 | 17081 } // namespace gles2 |
| 17087 } // namespace gpu | 17082 } // namespace gpu |
| OLD | NEW |