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

Side by Side Diff: cc/test/fake_output_surface.h

Issue 2089753003: cc: Use the correct internal format for glCopyTexImage2D calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: copytextureformat: comments Created 4 years, 6 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/test/data/force_anti_aliasing_off.png ('k') | cc/test/fake_output_surface.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 CC_TEST_FAKE_OUTPUT_SURFACE_H_ 5 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_H_
6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_ 6 #define CC_TEST_FAKE_OUTPUT_SURFACE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 } 110 }
111 111
112 CompositorFrame& last_sent_frame() { return last_sent_frame_; } 112 CompositorFrame& last_sent_frame() { return last_sent_frame_; }
113 size_t num_sent_frames() { return num_sent_frames_; } 113 size_t num_sent_frames() { return num_sent_frames_; }
114 114
115 void SwapBuffers(CompositorFrame* frame) override; 115 void SwapBuffers(CompositorFrame* frame) override;
116 116
117 OutputSurfaceClient* client() { return client_; } 117 OutputSurfaceClient* client() { return client_; }
118 bool BindToClient(OutputSurfaceClient* client) override; 118 bool BindToClient(OutputSurfaceClient* client) override;
119 119
120 void set_framebuffer(unsigned framebuffer) { framebuffer_ = framebuffer; } 120 void set_framebuffer(GLint framebuffer, GLenum format) {
121 framebuffer_ = framebuffer;
122 framebuffer_format_ = format;
123 }
121 void BindFramebuffer() override; 124 void BindFramebuffer() override;
125 uint32_t GetFramebufferCopyTextureFormat() override;
122 126
123 void SetTreeActivationCallback(const base::Closure& callback); 127 void SetTreeActivationCallback(const base::Closure& callback);
124 128
125 const TransferableResourceArray& resources_held_by_parent() { 129 const TransferableResourceArray& resources_held_by_parent() {
126 return resources_held_by_parent_; 130 return resources_held_by_parent_;
127 } 131 }
128 132
129 void ReturnResource(unsigned id, CompositorFrameAck* ack); 133 void ReturnResource(unsigned id, CompositorFrameAck* ack);
130 134
131 bool HasExternalStencilTest() const override; 135 bool HasExternalStencilTest() const override;
(...skipping 26 matching lines...) Expand all
158 bool delegated_rendering); 162 bool delegated_rendering);
159 163
160 FakeOutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device, 164 FakeOutputSurface(std::unique_ptr<SoftwareOutputDevice> software_device,
161 bool delegated_rendering); 165 bool delegated_rendering);
162 166
163 FakeOutputSurface(scoped_refptr<ContextProvider> context_provider, 167 FakeOutputSurface(scoped_refptr<ContextProvider> context_provider,
164 scoped_refptr<ContextProvider> worker_context_provider, 168 scoped_refptr<ContextProvider> worker_context_provider,
165 std::unique_ptr<SoftwareOutputDevice> software_device, 169 std::unique_ptr<SoftwareOutputDevice> software_device,
166 bool delegated_rendering); 170 bool delegated_rendering);
167 171
168 OutputSurfaceClient* client_; 172 OutputSurfaceClient* client_ = nullptr;
169 CompositorFrame last_sent_frame_; 173 CompositorFrame last_sent_frame_;
170 size_t num_sent_frames_; 174 size_t num_sent_frames_ = 0;
171 bool has_external_stencil_test_; 175 bool has_external_stencil_test_ = false;
172 bool suspended_for_recycle_; 176 bool suspended_for_recycle_ = false;
173 unsigned framebuffer_; 177 GLint framebuffer_ = 0;
178 GLenum framebuffer_format_ = 0;
174 TransferableResourceArray resources_held_by_parent_; 179 TransferableResourceArray resources_held_by_parent_;
175 std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_; 180 std::unique_ptr<ManagedMemoryPolicy> memory_policy_to_set_at_bind_;
176 OverlayCandidateValidator* overlay_candidate_validator_; 181 OverlayCandidateValidator* overlay_candidate_validator_ = nullptr;
177 gfx::Rect last_swap_rect_; 182 gfx::Rect last_swap_rect_;
178 }; 183 };
179 184
180 } // namespace cc 185 } // namespace cc
181 186
182 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ 187 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_
OLDNEW
« no previous file with comments | « cc/test/data/force_anti_aliasing_off.png ('k') | cc/test/fake_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698