OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "cc/resources/resource_provider.h" | 5 #include "cc/resources/resource_provider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
11 #include "base/debug/trace_event.h" | 11 #include "base/debug/trace_event.h" |
12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
13 #include "base/strings/string_split.h" | 13 #include "base/strings/string_split.h" |
14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
15 #include "cc/base/util.h" | 15 #include "cc/base/util.h" |
16 #include "cc/output/gl_renderer.h" // For the GLC() macro. | 16 #include "cc/output/gl_renderer.h" // For the GLC() macro. |
17 #include "cc/resources/gpu_memory_buffer_manager.h" | 17 #include "cc/resources/gpu_memory_buffer_manager.h" |
18 #include "cc/resources/platform_color.h" | 18 #include "cc/resources/platform_color.h" |
19 #include "cc/resources/returned_resource.h" | 19 #include "cc/resources/returned_resource.h" |
20 #include "cc/resources/shared_bitmap_manager.h" | 20 #include "cc/resources/shared_bitmap_manager.h" |
21 #include "cc/resources/texture_uploader.h" | 21 #include "cc/resources/texture_uploader.h" |
22 #include "cc/resources/transferable_resource.h" | 22 #include "cc/resources/transferable_resource.h" |
23 #include "gpu/GLES2/gl2extchromium.h" | 23 #include "gpu/GLES2/gl2extchromium.h" |
24 #include "gpu/command_buffer/client/gles2_interface.h" | 24 #include "gpu/command_buffer/client/gles2_interface.h" |
25 #include "third_party/khronos/GLES2/gl2.h" | 25 #include "third_party/khronos/GLES2/gl2.h" |
26 #include "third_party/khronos/GLES2/gl2ext.h" | 26 #include "third_party/khronos/GLES2/gl2ext.h" |
27 #include "third_party/skia/include/core/SkSurface.h" | 27 #include "third_party/skia/include/core/SkSurface.h" |
28 #include "third_party/skia/include/gpu/GrContext.h" | 28 #include "third_party/skia/include/gpu/GrContext.h" |
29 #include "ui/gfx/frame_time.h" | 29 #include "ui/gfx/frame_time.h" |
| 30 #include "ui/gfx/geometry/rect.h" |
| 31 #include "ui/gfx/geometry/vector2d.h" |
30 #include "ui/gfx/gpu_memory_buffer.h" | 32 #include "ui/gfx/gpu_memory_buffer.h" |
31 #include "ui/gfx/rect.h" | |
32 #include "ui/gfx/vector2d.h" | |
33 | 33 |
34 using gpu::gles2::GLES2Interface; | 34 using gpu::gles2::GLES2Interface; |
35 | 35 |
36 namespace cc { | 36 namespace cc { |
37 | 37 |
38 class IdAllocator { | 38 class IdAllocator { |
39 public: | 39 public: |
40 virtual ~IdAllocator() {} | 40 virtual ~IdAllocator() {} |
41 | 41 |
42 virtual GLuint NextId() = 0; | 42 virtual GLuint NextId() = 0; |
(...skipping 2051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2094 ContextProvider* context_provider = output_surface_->context_provider(); | 2094 ContextProvider* context_provider = output_surface_->context_provider(); |
2095 return context_provider ? context_provider->ContextGL() : NULL; | 2095 return context_provider ? context_provider->ContextGL() : NULL; |
2096 } | 2096 } |
2097 | 2097 |
2098 class GrContext* ResourceProvider::GrContext() const { | 2098 class GrContext* ResourceProvider::GrContext() const { |
2099 ContextProvider* context_provider = output_surface_->context_provider(); | 2099 ContextProvider* context_provider = output_surface_->context_provider(); |
2100 return context_provider ? context_provider->GrContext() : NULL; | 2100 return context_provider ? context_provider->GrContext() : NULL; |
2101 } | 2101 } |
2102 | 2102 |
2103 } // namespace cc | 2103 } // namespace cc |
OLD | NEW |