| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "gpu/command_buffer/service/texture_definition.h" | 5 #include "gpu/command_buffer/service/texture_definition.h" |
| 6 | 6 |
| 7 #include <stdint.h> |
| 8 |
| 7 #include <list> | 9 #include <list> |
| 8 | 10 |
| 9 #include "base/lazy_instance.h" | 11 #include "base/lazy_instance.h" |
| 10 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
| 11 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/synchronization/lock.h" | 14 #include "base/synchronization/lock.h" |
| 13 #include "base/threading/thread_local.h" | 15 #include "base/threading/thread_local.h" |
| 14 #include "gpu/command_buffer/service/texture_manager.h" | 16 #include "gpu/command_buffer/service/texture_manager.h" |
| 15 #include "ui/gl/gl_image.h" | 17 #include "ui/gl/gl_image.h" |
| 16 #include "ui/gl/gl_implementation.h" | 18 #include "ui/gl/gl_implementation.h" |
| 17 #include "ui/gl/scoped_binders.h" | 19 #include "ui/gl/scoped_binders.h" |
| 18 | 20 |
| 19 #if !defined(OS_MACOSX) | 21 #if !defined(OS_MACOSX) |
| 22 #include "base/macros.h" |
| 20 #include "ui/gl/gl_surface_egl.h" | 23 #include "ui/gl/gl_surface_egl.h" |
| 21 #endif | 24 #endif |
| 22 | 25 |
| 23 namespace gpu { | 26 namespace gpu { |
| 24 namespace gles2 { | 27 namespace gles2 { |
| 25 | 28 |
| 26 namespace { | 29 namespace { |
| 27 | 30 |
| 28 class GLImageSync : public gl::GLImage { | 31 class GLImageSync : public gl::GLImage { |
| 29 public: | 32 public: |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 return true; | 457 return true; |
| 455 } | 458 } |
| 456 | 459 |
| 457 bool TextureDefinition::SafeToRenderFrom() const { | 460 bool TextureDefinition::SafeToRenderFrom() const { |
| 458 return level_info_.cleared_rect.Contains( | 461 return level_info_.cleared_rect.Contains( |
| 459 gfx::Rect(level_info_.width, level_info_.height)); | 462 gfx::Rect(level_info_.width, level_info_.height)); |
| 460 } | 463 } |
| 461 | 464 |
| 462 } // namespace gles2 | 465 } // namespace gles2 |
| 463 } // namespace gpu | 466 } // namespace gpu |
| OLD | NEW |