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/layers/io_surface_layer_impl.h" | 5 #include "cc/layers/io_surface_layer_impl.h" |
6 | 6 |
7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
8 #include "cc/layers/quad_sink.h" | 8 #include "cc/layers/quad_sink.h" |
9 #include "cc/output/gl_renderer.h" // For the GLC() macro. | 9 #include "cc/output/gl_renderer.h" // For the GLC() macro. |
10 #include "cc/output/output_surface.h" | 10 #include "cc/output/output_surface.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 context3d->texParameteri( | 76 context3d->texParameteri( |
77 GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)); | 77 GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)); |
78 GLC(context3d, | 78 GLC(context3d, |
79 context3d->texParameteri( | 79 context3d->texParameteri( |
80 GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)); | 80 GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)); |
81 context3d->texImageIOSurface2DCHROMIUM(GL_TEXTURE_RECTANGLE_ARB, | 81 context3d->texImageIOSurface2DCHROMIUM(GL_TEXTURE_RECTANGLE_ARB, |
82 io_surface_size_.width(), | 82 io_surface_size_.width(), |
83 io_surface_size_.height(), | 83 io_surface_size_.height(), |
84 io_surface_id_, | 84 io_surface_id_, |
85 0); | 85 0); |
86 // Do not check for error conditions. texImageIOSurface2DCHROMIUM is | 86 // Do not check for error conditions. texImageIOSurface2DCHROMIUM() is |
87 // supposed to hold on to the last good IOSurface if the new one is already | 87 // supposed to hold on to the last good IOSurface if the new one is already |
88 // closed. This is only a possibility during live resizing of plugins. | 88 // closed. This is only a possibility during live resizing of plugins. |
89 // However, it seems that this is not sufficient to completely guard against | 89 // However, it seems that this is not sufficient to completely guard against |
90 // garbage being drawn. If this is found to be a significant issue, it may | 90 // garbage being drawn. If this is found to be a significant issue, it may |
91 // be necessary to explicitly tell the embedder when to free the surfaces it | 91 // be necessary to explicitly tell the embedder when to free the surfaces it |
92 // has allocated. | 92 // has allocated. |
93 io_surface_changed_ = false; | 93 io_surface_changed_ = false; |
94 } | 94 } |
95 } | 95 } |
96 | 96 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 136 |
137 io_surface_id_ = io_surface_id; | 137 io_surface_id_ = io_surface_id; |
138 io_surface_size_ = size; | 138 io_surface_size_ = size; |
139 } | 139 } |
140 | 140 |
141 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { | 141 const char* IOSurfaceLayerImpl::LayerTypeAsString() const { |
142 return "IOSurfaceLayer"; | 142 return "IOSurfaceLayer"; |
143 } | 143 } |
144 | 144 |
145 } // namespace cc | 145 } // namespace cc |
OLD | NEW |