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> |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "cc/resources/layer_quad.h" | 33 #include "cc/resources/layer_quad.h" |
34 #include "cc/resources/scoped_resource.h" | 34 #include "cc/resources/scoped_resource.h" |
35 #include "cc/resources/texture_mailbox_deleter.h" | 35 #include "cc/resources/texture_mailbox_deleter.h" |
36 #include "cc/trees/damage_tracker.h" | 36 #include "cc/trees/damage_tracker.h" |
37 #include "cc/trees/proxy.h" | 37 #include "cc/trees/proxy.h" |
38 #include "cc/trees/single_thread_proxy.h" | 38 #include "cc/trees/single_thread_proxy.h" |
39 #include "gpu/GLES2/gl2extchromium.h" | 39 #include "gpu/GLES2/gl2extchromium.h" |
40 #include "gpu/command_buffer/client/context_support.h" | 40 #include "gpu/command_buffer/client/context_support.h" |
41 #include "gpu/command_buffer/client/gles2_interface.h" | 41 #include "gpu/command_buffer/client/gles2_interface.h" |
42 #include "gpu/command_buffer/common/gpu_memory_allocation.h" | 42 #include "gpu/command_buffer/common/gpu_memory_allocation.h" |
43 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | |
44 #include "third_party/khronos/GLES2/gl2.h" | 43 #include "third_party/khronos/GLES2/gl2.h" |
45 #include "third_party/khronos/GLES2/gl2ext.h" | 44 #include "third_party/khronos/GLES2/gl2ext.h" |
46 #include "third_party/skia/include/core/SkBitmap.h" | 45 #include "third_party/skia/include/core/SkBitmap.h" |
47 #include "third_party/skia/include/core/SkColor.h" | 46 #include "third_party/skia/include/core/SkColor.h" |
48 #include "third_party/skia/include/core/SkColorFilter.h" | 47 #include "third_party/skia/include/core/SkColorFilter.h" |
49 #include "third_party/skia/include/core/SkSurface.h" | 48 #include "third_party/skia/include/core/SkSurface.h" |
50 #include "third_party/skia/include/gpu/GrContext.h" | 49 #include "third_party/skia/include/gpu/GrContext.h" |
51 #include "third_party/skia/include/gpu/GrTexture.h" | 50 #include "third_party/skia/include/gpu/GrTexture.h" |
52 #include "third_party/skia/include/gpu/SkGpuDevice.h" | 51 #include "third_party/skia/include/gpu/SkGpuDevice.h" |
53 #include "third_party/skia/include/gpu/SkGrTexturePixelRef.h" | 52 #include "third_party/skia/include/gpu/SkGrTexturePixelRef.h" |
54 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" | 53 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" |
55 #include "ui/gfx/quad_f.h" | 54 #include "ui/gfx/quad_f.h" |
56 #include "ui/gfx/rect_conversions.h" | 55 #include "ui/gfx/rect_conversions.h" |
57 | 56 |
58 using blink::WebGraphicsContext3D; | |
59 using gpu::gles2::GLES2Interface; | 57 using gpu::gles2::GLES2Interface; |
60 | 58 |
61 namespace cc { | 59 namespace cc { |
62 | 60 |
63 namespace { | 61 namespace { |
64 | 62 |
65 // TODO(epenner): This should probably be moved to output surface. | 63 // TODO(epenner): This should probably be moved to output surface. |
66 // | 64 // |
67 // This implements a simple fence based on client side swaps. | 65 // This implements a simple fence based on client side swaps. |
68 // This is to isolate the ResourceProvider from 'frames' which | 66 // This is to isolate the ResourceProvider from 'frames' which |
(...skipping 2937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3006 is_scissor_enabled_ = false; | 3004 is_scissor_enabled_ = false; |
3007 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); | 3005 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); |
3008 scissor_rect_needs_reset_ = true; | 3006 scissor_rect_needs_reset_ = true; |
3009 } | 3007 } |
3010 | 3008 |
3011 bool GLRenderer::IsContextLost() { | 3009 bool GLRenderer::IsContextLost() { |
3012 return output_surface_->context_provider()->IsContextLost(); | 3010 return output_surface_->context_provider()->IsContextLost(); |
3013 } | 3011 } |
3014 | 3012 |
3015 } // namespace cc | 3013 } // namespace cc |
OLD | NEW |