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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/icu_util.h" | 8 #include "base/i18n/icu_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 context_->bindTexture(GL_TEXTURE_2D, texture_id()); | 140 context_->bindTexture(GL_TEXTURE_2D, texture_id()); |
141 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | 141 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); |
142 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); | 142 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); |
143 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); | 143 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); |
144 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); | 144 context_->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); |
145 context_->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, | 145 context_->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, |
146 size.width(), size.height(), 0, | 146 size.width(), size.height(), 0, |
147 GL_RGBA, GL_UNSIGNED_BYTE, NULL); | 147 GL_RGBA, GL_UNSIGNED_BYTE, NULL); |
148 } | 148 } |
149 | 149 |
150 virtual WebGraphicsContext3D* HostContext3D() OVERRIDE { | |
151 return context_; | |
152 } | |
153 | |
154 private: | 150 private: |
155 virtual ~WebGLTexture() { | 151 virtual ~WebGLTexture() { |
156 context_->deleteTexture(texture_id()); | 152 context_->deleteTexture(texture_id()); |
157 } | 153 } |
158 | 154 |
159 WebGraphicsContext3D* context_; | 155 WebGraphicsContext3D* context_; |
160 | 156 |
161 DISALLOW_COPY_AND_ASSIGN(WebGLTexture); | 157 DISALLOW_COPY_AND_ASSIGN(WebGLTexture); |
162 }; | 158 }; |
163 | 159 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 #endif | 337 #endif |
342 | 338 |
343 root_window->ShowRootWindow(); | 339 root_window->ShowRootWindow(); |
344 MessageLoopForUI::current()->Run(); | 340 MessageLoopForUI::current()->Run(); |
345 root_window.reset(); | 341 root_window.reset(); |
346 | 342 |
347 ui::CompositorTestSupport::Terminate(); | 343 ui::CompositorTestSupport::Terminate(); |
348 | 344 |
349 return 0; | 345 return 0; |
350 } | 346 } |
OLD | NEW |