| OLD | NEW | 
|---|
| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 86   } | 86   } | 
| 87 | 87 | 
| 88   void set_has_external_stencil_test(bool has_test) { | 88   void set_has_external_stencil_test(bool has_test) { | 
| 89     has_external_stencil_test_ = has_test; | 89     has_external_stencil_test_ = has_test; | 
| 90   } | 90   } | 
| 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 { |  | 
| 97     DCHECK(last_swap_rect_valid_); |  | 
| 98     return last_swap_rect_; |  | 
| 99   } |  | 
| 100 |  | 
| 101   const gfx::ColorSpace& last_reshape_color_space() { | 96   const gfx::ColorSpace& last_reshape_color_space() { | 
| 102     return last_reshape_color_space_; | 97     return last_reshape_color_space_; | 
| 103   } | 98   } | 
| 104 | 99 | 
| 105  protected: | 100  protected: | 
| 106   explicit FakeOutputSurface(scoped_refptr<ContextProvider> context_provider); | 101   explicit FakeOutputSurface(scoped_refptr<ContextProvider> context_provider); | 
| 107   explicit FakeOutputSurface( | 102   explicit FakeOutputSurface( | 
| 108       std::unique_ptr<SoftwareOutputDevice> software_device); | 103       std::unique_ptr<SoftwareOutputDevice> software_device); | 
| 109 | 104 | 
| 110   OutputSurfaceClient* client_ = nullptr; | 105   OutputSurfaceClient* client_ = nullptr; | 
| 111   std::unique_ptr<OutputSurfaceFrame> last_sent_frame_; | 106   std::unique_ptr<OutputSurfaceFrame> last_sent_frame_; | 
| 112   size_t num_sent_frames_ = 0; | 107   size_t num_sent_frames_ = 0; | 
| 113   bool has_external_stencil_test_ = false; | 108   bool has_external_stencil_test_ = false; | 
| 114   bool suspended_for_recycle_ = false; | 109   bool suspended_for_recycle_ = false; | 
| 115   GLint framebuffer_ = 0; | 110   GLint framebuffer_ = 0; | 
| 116   GLenum framebuffer_format_ = 0; | 111   GLenum framebuffer_format_ = 0; | 
| 117   OverlayCandidateValidator* overlay_candidate_validator_ = nullptr; | 112   OverlayCandidateValidator* overlay_candidate_validator_ = nullptr; | 
| 118   bool last_swap_rect_valid_ = false; |  | 
| 119   gfx::Rect last_swap_rect_; |  | 
| 120   gfx::ColorSpace last_reshape_color_space_; | 113   gfx::ColorSpace last_reshape_color_space_; | 
| 121 | 114 | 
| 122  private: | 115  private: | 
| 123   void SwapBuffersAck(); | 116   void SwapBuffersAck(); | 
| 124 | 117 | 
| 125   base::WeakPtrFactory<FakeOutputSurface> weak_ptr_factory_; | 118   base::WeakPtrFactory<FakeOutputSurface> weak_ptr_factory_; | 
| 126 }; | 119 }; | 
| 127 | 120 | 
| 128 }  // namespace cc | 121 }  // namespace cc | 
| 129 | 122 | 
| 130 #endif  // CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 123 #endif  // CC_TEST_FAKE_OUTPUT_SURFACE_H_ | 
| OLD | NEW | 
|---|