| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/output/output_surface.h" | 5 #include "cc/output/output_surface.h" |
| 6 #include "cc/output/output_surface_client.h" | 6 #include "cc/output/output_surface_client.h" |
| 7 #include "cc/output/software_output_device.h" | 7 #include "cc/output/software_output_device.h" |
| 8 #include "cc/test/test_web_graphics_context_3d.h" | 8 #include "cc/test/test_web_graphics_context_3d.h" |
| 9 #include "gpu/GLES2/gl2extchromium.h" | 9 #include "gpu/GLES2/gl2extchromium.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 virtual bool DeferredInitialize( | 44 virtual bool DeferredInitialize( |
| 45 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE { | 45 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE { |
| 46 deferred_initialize_called_ = true; | 46 deferred_initialize_called_ = true; |
| 47 return deferred_initialize_result_; | 47 return deferred_initialize_result_; |
| 48 } | 48 } |
| 49 virtual void SetNeedsRedrawRect(gfx::Rect damage_rect) OVERRIDE {} | 49 virtual void SetNeedsRedrawRect(gfx::Rect damage_rect) OVERRIDE {} |
| 50 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, | 50 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, |
| 51 base::TimeDelta interval) OVERRIDE {} | 51 base::TimeDelta interval) OVERRIDE {} |
| 52 virtual void BeginFrame(base::TimeTicks frame_time) OVERRIDE {} | 52 virtual void BeginFrame(base::TimeTicks frame_time) OVERRIDE {} |
| 53 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack) | 53 virtual void OnSwapBuffersComplete(const CompositorFrameAck* ack) OVERRIDE {} |
| 54 OVERRIDE {} | |
| 55 virtual void OnSwapBuffersComplete() OVERRIDE {} | |
| 56 virtual void DidLoseOutputSurface() OVERRIDE { | 54 virtual void DidLoseOutputSurface() OVERRIDE { |
| 57 did_lose_output_surface_called_ = true; | 55 did_lose_output_surface_called_ = true; |
| 58 } | 56 } |
| 59 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, | 57 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, |
| 60 gfx::Rect viewport) OVERRIDE {} | 58 gfx::Rect viewport) OVERRIDE {} |
| 61 | 59 |
| 62 void set_deferred_initialize_result(bool result) { | 60 void set_deferred_initialize_result(bool result) { |
| 63 deferred_initialize_result_ = result; | 61 deferred_initialize_result_ = result; |
| 64 } | 62 } |
| 65 | 63 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 } | 159 } |
| 162 | 160 |
| 163 TEST_F(InitializeNewContext3D, ClientDeferredInitializeFails) { | 161 TEST_F(InitializeNewContext3D, ClientDeferredInitializeFails) { |
| 164 BindOutputSurface(); | 162 BindOutputSurface(); |
| 165 client_.set_deferred_initialize_result(false); | 163 client_.set_deferred_initialize_result(false); |
| 166 InitializeNewContextExpectFail(); | 164 InitializeNewContextExpectFail(); |
| 167 } | 165 } |
| 168 | 166 |
| 169 } // namespace | 167 } // namespace |
| 170 } // namespace cc | 168 } // namespace cc |
| OLD | NEW |