| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/debug/trace_event.h" | 13 #include "base/debug/trace_event.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/strings/string_split.h" | |
| 16 #include "base/strings/string_util.h" | |
| 17 #include "base/strings/stringprintf.h" | |
| 18 #include "build/build_config.h" | |
| 19 #include "cc/base/math_util.h" | 15 #include "cc/base/math_util.h" |
| 20 #include "cc/layers/video_layer_impl.h" | 16 #include "cc/layers/video_layer_impl.h" |
| 21 #include "cc/output/compositor_frame.h" | 17 #include "cc/output/compositor_frame.h" |
| 22 #include "cc/output/compositor_frame_metadata.h" | 18 #include "cc/output/compositor_frame_metadata.h" |
| 23 #include "cc/output/context_provider.h" | 19 #include "cc/output/context_provider.h" |
| 24 #include "cc/output/copy_output_request.h" | 20 #include "cc/output/copy_output_request.h" |
| 25 #include "cc/output/geometry_binding.h" | 21 #include "cc/output/geometry_binding.h" |
| 26 #include "cc/output/gl_frame_data.h" | 22 #include "cc/output/gl_frame_data.h" |
| 27 #include "cc/output/output_surface.h" | 23 #include "cc/output/output_surface.h" |
| 28 #include "cc/output/render_surface_filters.h" | 24 #include "cc/output/render_surface_filters.h" |
| 29 #include "cc/quads/picture_draw_quad.h" | 25 #include "cc/quads/picture_draw_quad.h" |
| 30 #include "cc/quads/render_pass.h" | 26 #include "cc/quads/render_pass.h" |
| 31 #include "cc/quads/stream_video_draw_quad.h" | 27 #include "cc/quads/stream_video_draw_quad.h" |
| 32 #include "cc/quads/texture_draw_quad.h" | 28 #include "cc/quads/texture_draw_quad.h" |
| 33 #include "cc/resources/layer_quad.h" | 29 #include "cc/resources/layer_quad.h" |
| 34 #include "cc/resources/raster_worker_pool.h" | 30 #include "cc/resources/raster_worker_pool.h" |
| 35 #include "cc/resources/scoped_resource.h" | 31 #include "cc/resources/scoped_resource.h" |
| 36 #include "cc/resources/texture_mailbox_deleter.h" | 32 #include "cc/resources/texture_mailbox_deleter.h" |
| 37 #include "cc/trees/damage_tracker.h" | |
| 38 #include "cc/trees/proxy.h" | |
| 39 #include "cc/trees/single_thread_proxy.h" | |
| 40 #include "gpu/GLES2/gl2extchromium.h" | 33 #include "gpu/GLES2/gl2extchromium.h" |
| 41 #include "gpu/command_buffer/client/context_support.h" | 34 #include "gpu/command_buffer/client/context_support.h" |
| 42 #include "gpu/command_buffer/client/gles2_interface.h" | 35 #include "gpu/command_buffer/client/gles2_interface.h" |
| 43 #include "gpu/command_buffer/common/gpu_memory_allocation.h" | 36 #include "gpu/command_buffer/common/gpu_memory_allocation.h" |
| 44 #include "third_party/khronos/GLES2/gl2.h" | |
| 45 #include "third_party/khronos/GLES2/gl2ext.h" | |
| 46 #include "third_party/skia/include/core/SkBitmap.h" | 37 #include "third_party/skia/include/core/SkBitmap.h" |
| 47 #include "third_party/skia/include/core/SkColor.h" | 38 #include "third_party/skia/include/core/SkColor.h" |
| 48 #include "third_party/skia/include/core/SkColorFilter.h" | 39 #include "third_party/skia/include/core/SkColorFilter.h" |
| 49 #include "third_party/skia/include/core/SkSurface.h" | 40 #include "third_party/skia/include/core/SkSurface.h" |
| 50 #include "third_party/skia/include/gpu/GrContext.h" | 41 #include "third_party/skia/include/gpu/GrContext.h" |
| 51 #include "third_party/skia/include/gpu/GrTexture.h" | 42 #include "third_party/skia/include/gpu/GrTexture.h" |
| 52 #include "third_party/skia/include/gpu/SkGpuDevice.h" | 43 #include "third_party/skia/include/gpu/SkGpuDevice.h" |
| 53 #include "third_party/skia/include/gpu/SkGrTexturePixelRef.h" | 44 #include "third_party/skia/include/gpu/SkGrTexturePixelRef.h" |
| 54 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" | 45 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" |
| 55 #include "ui/gfx/quad_f.h" | 46 #include "ui/gfx/geometry/quad_f.h" |
| 56 #include "ui/gfx/rect_conversions.h" | 47 #include "ui/gfx/geometry/rect_conversions.h" |
| 57 | 48 |
| 58 using gpu::gles2::GLES2Interface; | 49 using gpu::gles2::GLES2Interface; |
| 59 | 50 |
| 60 namespace cc { | 51 namespace cc { |
| 61 namespace { | 52 namespace { |
| 62 | 53 |
| 63 class FallbackFence : public ResourceProvider::Fence { | 54 class FallbackFence : public ResourceProvider::Fence { |
| 64 public: | 55 public: |
| 65 explicit FallbackFence(gpu::gles2::GLES2Interface* gl) | 56 explicit FallbackFence(gpu::gles2::GLES2Interface* gl) |
| 66 : gl_(gl), has_passed_(true) {} | 57 : gl_(gl), has_passed_(true) {} |
| (...skipping 3137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3204 context_support_->ScheduleOverlayPlane( | 3195 context_support_->ScheduleOverlayPlane( |
| 3205 overlay.plane_z_order, | 3196 overlay.plane_z_order, |
| 3206 overlay.transform, | 3197 overlay.transform, |
| 3207 pending_overlay_resources_.back()->texture_id(), | 3198 pending_overlay_resources_.back()->texture_id(), |
| 3208 overlay.display_rect, | 3199 overlay.display_rect, |
| 3209 overlay.uv_rect); | 3200 overlay.uv_rect); |
| 3210 } | 3201 } |
| 3211 } | 3202 } |
| 3212 | 3203 |
| 3213 } // namespace cc | 3204 } // namespace cc |
| OLD | NEW |