Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: cc/test/test_gpu_memory_buffer_manager.cc

Issue 1417363006: ui: Add support for creating GLImage instances from shared memory pools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@usage-rename
Patch Set: static_cast<off_t> to make windows build happy Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/test/test_image_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "cc/test/test_gpu_memory_buffer_manager.h" 5 #include "cc/test/test_gpu_memory_buffer_manager.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/numerics/safe_conversions.h" 8 #include "base/numerics/safe_conversions.h"
9 #include "ui/gfx/buffer_format_util.h" 9 #include "ui/gfx/buffer_format_util.h"
10 #include "ui/gfx/gpu_memory_buffer.h" 10 #include "ui/gfx/gpu_memory_buffer.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 size_.width(), format_, static_cast<int>(plane))); 49 size_.width(), format_, static_cast<int>(plane)));
50 } 50 }
51 gfx::GpuMemoryBufferId GetId() const override { 51 gfx::GpuMemoryBufferId GetId() const override {
52 NOTREACHED(); 52 NOTREACHED();
53 return gfx::GpuMemoryBufferId(0); 53 return gfx::GpuMemoryBufferId(0);
54 } 54 }
55 gfx::GpuMemoryBufferHandle GetHandle() const override { 55 gfx::GpuMemoryBufferHandle GetHandle() const override {
56 gfx::GpuMemoryBufferHandle handle; 56 gfx::GpuMemoryBufferHandle handle;
57 handle.type = gfx::SHARED_MEMORY_BUFFER; 57 handle.type = gfx::SHARED_MEMORY_BUFFER;
58 handle.handle = shared_memory_->handle(); 58 handle.handle = shared_memory_->handle();
59 handle.offset = 0;
59 return handle; 60 return handle;
60 } 61 }
61 ClientBuffer AsClientBuffer() override { 62 ClientBuffer AsClientBuffer() override {
62 return reinterpret_cast<ClientBuffer>(this); 63 return reinterpret_cast<ClientBuffer>(this);
63 } 64 }
64 65
65 private: 66 private:
66 const gfx::Size size_; 67 const gfx::Size size_;
67 gfx::BufferFormat format_; 68 gfx::BufferFormat format_;
68 scoped_ptr<base::SharedMemory> shared_memory_; 69 scoped_ptr<base::SharedMemory> shared_memory_;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 ClientBuffer buffer) { 104 ClientBuffer buffer) {
104 return reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer); 105 return reinterpret_cast<gfx::GpuMemoryBuffer*>(buffer);
105 } 106 }
106 107
107 void TestGpuMemoryBufferManager::SetDestructionSyncPoint( 108 void TestGpuMemoryBufferManager::SetDestructionSyncPoint(
108 gfx::GpuMemoryBuffer* buffer, 109 gfx::GpuMemoryBuffer* buffer,
109 uint32 sync_point) { 110 uint32 sync_point) {
110 } 111 }
111 112
112 } // namespace cc 113 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/test/test_image_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698