| 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/resource_provider.h" | 5 #include "cc/resource_provider.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 | 8 |
| 9 #include "base/debug/alias.h" | 9 #include "base/debug/alias.h" |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "base/string_split.h" | 12 #include "base/string_split.h" |
| 13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "cc/gl_renderer.h" // For the GLC() macro. | 14 #include "cc/gl_renderer.h" // For the GLC() macro. |
| 15 #include "cc/platform_color.h" | 15 #include "cc/platform_color.h" |
| 16 #include "cc/texture_uploader.h" | 16 #include "cc/texture_uploader.h" |
| 17 #include "cc/transferable_resource.h" | 17 #include "cc/transferable_resource.h" |
| 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
| 18 #include "third_party/khronos/GLES2/gl2.h" | 19 #include "third_party/khronos/GLES2/gl2.h" |
| 19 #include "third_party/khronos/GLES2/gl2ext.h" | 20 #include "third_party/khronos/GLES2/gl2ext.h" |
| 20 #include "ui/gfx/rect.h" | 21 #include "ui/gfx/rect.h" |
| 21 #include "ui/gfx/vector2d.h" | 22 #include "ui/gfx/vector2d.h" |
| 22 | 23 |
| 23 #include <public/WebGraphicsContext3D.h> | |
| 24 | |
| 25 using WebKit::WebGraphicsContext3D; | 24 using WebKit::WebGraphicsContext3D; |
| 26 | 25 |
| 27 namespace cc { | 26 namespace cc { |
| 28 | 27 |
| 29 static GLenum textureToStorageFormat(GLenum textureFormat) | 28 static GLenum textureToStorageFormat(GLenum textureFormat) |
| 30 { | 29 { |
| 31 GLenum storageFormat = GL_RGBA8_OES; | 30 GLenum storageFormat = GL_RGBA8_OES; |
| 32 switch (textureFormat) { | 31 switch (textureFormat) { |
| 33 case GL_RGBA: | 32 case GL_RGBA: |
| 34 break; | 33 break; |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 950 return false; | 949 return false; |
| 951 } | 950 } |
| 952 | 951 |
| 953 resource->pendingSetPixels = false; | 952 resource->pendingSetPixels = false; |
| 954 unlockForWrite(id); | 953 unlockForWrite(id); |
| 955 | 954 |
| 956 return true; | 955 return true; |
| 957 } | 956 } |
| 958 | 957 |
| 959 } // namespace cc | 958 } // namespace cc |
| OLD | NEW |