| 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 "ui/compositor/test/in_process_context_factory.h" | 5 #include "ui/compositor/test/in_process_context_factory.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
| 10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 if (!per_compositor_data_.count(compositor)) | 172 if (!per_compositor_data_.count(compositor)) |
| 173 return; | 173 return; |
| 174 delete per_compositor_data_[compositor]; | 174 delete per_compositor_data_[compositor]; |
| 175 per_compositor_data_.erase(compositor); | 175 per_compositor_data_.erase(compositor); |
| 176 } | 176 } |
| 177 | 177 |
| 178 bool InProcessContextFactory::DoesCreateTestContexts() { | 178 bool InProcessContextFactory::DoesCreateTestContexts() { |
| 179 return context_factory_for_test_; | 179 return context_factory_for_test_; |
| 180 } | 180 } |
| 181 | 181 |
| 182 uint32 InProcessContextFactory::GetImageTextureTarget( | 182 uint32 InProcessContextFactory::GetImageTextureTarget(gfx::BufferFormat format, |
| 183 gfx::GpuMemoryBuffer::Format format, | 183 gfx::BufferUsage usage) { |
| 184 gfx::GpuMemoryBuffer::Usage usage) { | |
| 185 return GL_TEXTURE_2D; | 184 return GL_TEXTURE_2D; |
| 186 } | 185 } |
| 187 | 186 |
| 188 cc::SharedBitmapManager* InProcessContextFactory::GetSharedBitmapManager() { | 187 cc::SharedBitmapManager* InProcessContextFactory::GetSharedBitmapManager() { |
| 189 return &shared_bitmap_manager_; | 188 return &shared_bitmap_manager_; |
| 190 } | 189 } |
| 191 | 190 |
| 192 gpu::GpuMemoryBufferManager* | 191 gpu::GpuMemoryBufferManager* |
| 193 InProcessContextFactory::GetGpuMemoryBufferManager() { | 192 InProcessContextFactory::GetGpuMemoryBufferManager() { |
| 194 return &gpu_memory_buffer_manager_; | 193 return &gpu_memory_buffer_manager_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 208 } | 207 } |
| 209 | 208 |
| 210 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, | 209 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, |
| 211 const gfx::Size& size) { | 210 const gfx::Size& size) { |
| 212 if (!per_compositor_data_.count(compositor)) | 211 if (!per_compositor_data_.count(compositor)) |
| 213 return; | 212 return; |
| 214 per_compositor_data_[compositor]->display()->Resize(size); | 213 per_compositor_data_[compositor]->display()->Resize(size); |
| 215 } | 214 } |
| 216 | 215 |
| 217 } // namespace ui | 216 } // namespace ui |
| OLD | NEW |