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

Side by Side Diff: components/display_compositor/buffer_queue.h

Issue 2829543003: gpu: Empty swaps for surfaceless output surfaces. (Closed)
Patch Set: new workaround Created 3 years, 8 months 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 | « cc/output/overlay_unittest.cc ('k') | components/display_compositor/buffer_queue.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 #ifndef COMPONENTS_DISPLAY_COMPOSITOR_BUFFER_QUEUE_H_ 5 #ifndef COMPONENTS_DISPLAY_COMPOSITOR_BUFFER_QUEUE_H_
6 #define COMPONENTS_DISPLAY_COMPOSITOR_BUFFER_QUEUE_H_ 6 #define COMPONENTS_DISPLAY_COMPOSITOR_BUFFER_QUEUE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <deque> 10 #include <deque>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 void Initialize(); 54 void Initialize();
55 55
56 void BindFramebuffer(); 56 void BindFramebuffer();
57 void SwapBuffers(const gfx::Rect& damage); 57 void SwapBuffers(const gfx::Rect& damage);
58 void PageFlipComplete(); 58 void PageFlipComplete();
59 void Reshape(const gfx::Size& size, 59 void Reshape(const gfx::Size& size,
60 float scale_factor, 60 float scale_factor,
61 const gfx::ColorSpace& color_space, 61 const gfx::ColorSpace& color_space,
62 bool use_stencil); 62 bool use_stencil);
63 void RecreateBuffers();
64 uint32_t GetCurrentTextureId() const;
63 65
64 void RecreateBuffers();
65
66 uint32_t current_texture_id() const {
67 return current_surface_ ? current_surface_->texture : 0;
68 }
69 uint32_t fbo() const { return fbo_; } 66 uint32_t fbo() const { return fbo_; }
70 uint32_t internal_format() const { return internal_format_; } 67 uint32_t internal_format() const { return internal_format_; }
71 68
72 private: 69 private:
73 friend class BufferQueueTest; 70 friend class BufferQueueTest;
74 friend class AllocatedSurface; 71 friend class AllocatedSurface;
75 72
76 struct DISPLAY_COMPOSITOR_EXPORT AllocatedSurface { 73 struct DISPLAY_COMPOSITOR_EXPORT AllocatedSurface {
77 AllocatedSurface(BufferQueue* buffer_queue, 74 AllocatedSurface(BufferQueue* buffer_queue,
78 std::unique_ptr<gfx::GpuMemoryBuffer> buffer, 75 std::unique_ptr<gfx::GpuMemoryBuffer> buffer,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 GLHelper* gl_helper_; 127 GLHelper* gl_helper_;
131 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 128 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
132 gpu::SurfaceHandle surface_handle_; 129 gpu::SurfaceHandle surface_handle_;
133 130
134 DISALLOW_COPY_AND_ASSIGN(BufferQueue); 131 DISALLOW_COPY_AND_ASSIGN(BufferQueue);
135 }; 132 };
136 133
137 } // namespace display_compositor 134 } // namespace display_compositor
138 135
139 #endif // COMPONENTS_DISPLAY_COMPOSITOR_BUFFER_QUEUE_H_ 136 #endif // COMPONENTS_DISPLAY_COMPOSITOR_BUFFER_QUEUE_H_
OLDNEW
« no previous file with comments | « cc/output/overlay_unittest.cc ('k') | components/display_compositor/buffer_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698