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

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

Issue 2693723002: cc: Move output color space from DrawingFrame to RenderPass (Closed)
Patch Set: Fix typo Created 3 years, 10 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
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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 void set_suspended_for_recycle(bool suspended) { 92 void set_suspended_for_recycle(bool suspended) {
93 suspended_for_recycle_ = suspended; 93 suspended_for_recycle_ = suspended;
94 } 94 }
95 95
96 gfx::Rect last_swap_rect() const { 96 gfx::Rect last_swap_rect() const {
97 DCHECK(last_swap_rect_valid_); 97 DCHECK(last_swap_rect_valid_);
98 return last_swap_rect_; 98 return last_swap_rect_;
99 } 99 }
100 100
101 const gfx::ColorSpace& last_reshape_color_space() {
102 return last_reshape_color_space_;
103 }
104
101 protected: 105 protected:
102 explicit FakeOutputSurface(scoped_refptr<ContextProvider> context_provider); 106 explicit FakeOutputSurface(scoped_refptr<ContextProvider> context_provider);
103 explicit FakeOutputSurface( 107 explicit FakeOutputSurface(
104 std::unique_ptr<SoftwareOutputDevice> software_device); 108 std::unique_ptr<SoftwareOutputDevice> software_device);
105 109
106 OutputSurfaceClient* client_ = nullptr; 110 OutputSurfaceClient* client_ = nullptr;
107 std::unique_ptr<OutputSurfaceFrame> last_sent_frame_; 111 std::unique_ptr<OutputSurfaceFrame> last_sent_frame_;
108 size_t num_sent_frames_ = 0; 112 size_t num_sent_frames_ = 0;
109 bool has_external_stencil_test_ = false; 113 bool has_external_stencil_test_ = false;
110 bool suspended_for_recycle_ = false; 114 bool suspended_for_recycle_ = false;
111 GLint framebuffer_ = 0; 115 GLint framebuffer_ = 0;
112 GLenum framebuffer_format_ = 0; 116 GLenum framebuffer_format_ = 0;
113 OverlayCandidateValidator* overlay_candidate_validator_ = nullptr; 117 OverlayCandidateValidator* overlay_candidate_validator_ = nullptr;
114 bool last_swap_rect_valid_ = false; 118 bool last_swap_rect_valid_ = false;
115 gfx::Rect last_swap_rect_; 119 gfx::Rect last_swap_rect_;
120 gfx::ColorSpace last_reshape_color_space_;
116 121
117 private: 122 private:
118 void SwapBuffersAck(); 123 void SwapBuffersAck();
119 124
120 base::WeakPtrFactory<FakeOutputSurface> weak_ptr_factory_; 125 base::WeakPtrFactory<FakeOutputSurface> weak_ptr_factory_;
121 }; 126 };
122 127
123 } // namespace cc 128 } // namespace cc
124 129
125 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_ 130 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698