| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 if (!per_compositor_data_.count(compositor)) | 173 if (!per_compositor_data_.count(compositor)) |
| 174 return; | 174 return; |
| 175 delete per_compositor_data_[compositor]; | 175 delete per_compositor_data_[compositor]; |
| 176 per_compositor_data_.erase(compositor); | 176 per_compositor_data_.erase(compositor); |
| 177 } | 177 } |
| 178 | 178 |
| 179 bool InProcessContextFactory::DoesCreateTestContexts() { | 179 bool InProcessContextFactory::DoesCreateTestContexts() { |
| 180 return context_factory_for_test_; | 180 return context_factory_for_test_; |
| 181 } | 181 } |
| 182 | 182 |
| 183 uint32 InProcessContextFactory::GetImageTextureTarget() { | 183 uint32 InProcessContextFactory::GetImageTextureTarget( |
| 184 gfx::GpuMemoryBuffer::Format format, |
| 185 gfx::GpuMemoryBuffer::Usage usage) { |
| 184 return GL_TEXTURE_2D; | 186 return GL_TEXTURE_2D; |
| 185 } | 187 } |
| 186 | 188 |
| 187 cc::SharedBitmapManager* InProcessContextFactory::GetSharedBitmapManager() { | 189 cc::SharedBitmapManager* InProcessContextFactory::GetSharedBitmapManager() { |
| 188 return &shared_bitmap_manager_; | 190 return &shared_bitmap_manager_; |
| 189 } | 191 } |
| 190 | 192 |
| 191 gpu::GpuMemoryBufferManager* | 193 gpu::GpuMemoryBufferManager* |
| 192 InProcessContextFactory::GetGpuMemoryBufferManager() { | 194 InProcessContextFactory::GetGpuMemoryBufferManager() { |
| 193 return &gpu_memory_buffer_manager_; | 195 return &gpu_memory_buffer_manager_; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 204 } | 206 } |
| 205 | 207 |
| 206 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, | 208 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, |
| 207 const gfx::Size& size) { | 209 const gfx::Size& size) { |
| 208 if (!per_compositor_data_.count(compositor)) | 210 if (!per_compositor_data_.count(compositor)) |
| 209 return; | 211 return; |
| 210 per_compositor_data_[compositor]->display()->Resize(size); | 212 per_compositor_data_[compositor]->display()->Resize(size); |
| 211 } | 213 } |
| 212 | 214 |
| 213 } // namespace ui | 215 } // namespace ui |
| OLD | NEW |