| 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 "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" |    5 #include "content/common/gpu/client/gpu_memory_buffer_impl_surface_texture.h" | 
|    6  |    6  | 
|    7 #include "base/bind.h" |    7 #include "base/bind.h" | 
|    8 #include "base/debug/trace_event.h" |    8 #include "base/debug/trace_event.h" | 
|    9 #include "base/logging.h" |    9 #include "base/logging.h" | 
|   10 #include "content/common/android/surface_texture_manager.h" |   10 #include "content/common/android/surface_texture_manager.h" | 
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  151       return true; |  151       return true; | 
|  152     case SCANOUT: |  152     case SCANOUT: | 
|  153       return false; |  153       return false; | 
|  154   } |  154   } | 
|  155  |  155  | 
|  156   NOTREACHED(); |  156   NOTREACHED(); | 
|  157   return false; |  157   return false; | 
|  158 } |  158 } | 
|  159  |  159  | 
|  160 // static |  160 // static | 
|  161 bool GpuMemoryBufferImplSurfaceTexture::IsConfigurationSupported(Format format, |  | 
|  162                                                                  Usage usage) { |  | 
|  163   return IsFormatSupported(format) && IsUsageSupported(usage); |  | 
|  164 } |  | 
|  165  |  | 
|  166 // static |  | 
|  167 int GpuMemoryBufferImplSurfaceTexture::WindowFormat(Format format) { |  161 int GpuMemoryBufferImplSurfaceTexture::WindowFormat(Format format) { | 
|  168   switch (format) { |  162   switch (format) { | 
|  169     case RGBA_8888: |  163     case RGBA_8888: | 
|  170       return WINDOW_FORMAT_RGBA_8888; |  164       return WINDOW_FORMAT_RGBA_8888; | 
|  171     case RGBX_8888: |  165     case RGBX_8888: | 
|  172     case BGRA_8888: |  166     case BGRA_8888: | 
|  173       NOTREACHED(); |  167       NOTREACHED(); | 
|  174       return 0; |  168       return 0; | 
|  175   } |  169   } | 
|  176  |  170  | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  210  |  204  | 
|  211 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplSurfaceTexture::GetHandle() |  205 gfx::GpuMemoryBufferHandle GpuMemoryBufferImplSurfaceTexture::GetHandle() | 
|  212     const { |  206     const { | 
|  213   gfx::GpuMemoryBufferHandle handle; |  207   gfx::GpuMemoryBufferHandle handle; | 
|  214   handle.type = gfx::SURFACE_TEXTURE_BUFFER; |  208   handle.type = gfx::SURFACE_TEXTURE_BUFFER; | 
|  215   handle.id = id_; |  209   handle.id = id_; | 
|  216   return handle; |  210   return handle; | 
|  217 } |  211 } | 
|  218  |  212  | 
|  219 }  // namespace content |  213 }  // namespace content | 
| OLD | NEW |