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

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

Issue 1160863007: DCHECK if shader compilation fails that it's due to context loss. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: glhelperlost: . Created 5 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
OLDNEW
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 #ifndef CC_TEST_TEST_CONTEXT_SUPPORT_H_ 5 #ifndef CC_TEST_TEST_CONTEXT_SUPPORT_H_
6 #define CC_TEST_TEST_CONTEXT_SUPPORT_H_ 6 #define CC_TEST_TEST_CONTEXT_SUPPORT_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 13 matching lines...) Expand all
24 void SetSurfaceVisible(bool visible) override; 24 void SetSurfaceVisible(bool visible) override;
25 void Swap() override; 25 void Swap() override;
26 void PartialSwapBuffers(const gfx::Rect& sub_buffer) override; 26 void PartialSwapBuffers(const gfx::Rect& sub_buffer) override;
27 uint32 InsertFutureSyncPointCHROMIUM() override; 27 uint32 InsertFutureSyncPointCHROMIUM() override;
28 void RetireSyncPointCHROMIUM(uint32 sync_point) override; 28 void RetireSyncPointCHROMIUM(uint32 sync_point) override;
29 void ScheduleOverlayPlane(int plane_z_order, 29 void ScheduleOverlayPlane(int plane_z_order,
30 gfx::OverlayTransform plane_transform, 30 gfx::OverlayTransform plane_transform,
31 unsigned overlay_texture_id, 31 unsigned overlay_texture_id,
32 const gfx::Rect& display_bounds, 32 const gfx::Rect& display_bounds,
33 const gfx::RectF& uv_rect) override; 33 const gfx::RectF& uv_rect) override;
34 bool IsContextLost() override;
34 35
35 void CallAllSyncPointCallbacks(); 36 void CallAllSyncPointCallbacks();
36 37
37 typedef base::Callback<void(bool visible)> SurfaceVisibleCallback; 38 typedef base::Callback<void(bool visible)> SurfaceVisibleCallback;
38 void SetSurfaceVisibleCallback( 39 void SetSurfaceVisibleCallback(
39 const SurfaceVisibleCallback& set_visible_callback); 40 const SurfaceVisibleCallback& set_visible_callback);
40 41
41 typedef base::Callback<void(int plane_z_order, 42 typedef base::Callback<void(int plane_z_order,
42 gfx::OverlayTransform plane_transform, 43 gfx::OverlayTransform plane_transform,
43 unsigned overlay_texture_id, 44 unsigned overlay_texture_id,
44 const gfx::Rect& display_bounds, 45 const gfx::Rect& display_bounds,
45 const gfx::RectF& crop_rect)> 46 const gfx::RectF& crop_rect)>
46 ScheduleOverlayPlaneCallback; 47 ScheduleOverlayPlaneCallback;
47 void SetScheduleOverlayPlaneCallback( 48 void SetScheduleOverlayPlaneCallback(
48 const ScheduleOverlayPlaneCallback& schedule_overlay_plane_callback); 49 const ScheduleOverlayPlaneCallback& schedule_overlay_plane_callback);
49 50
50 private: 51 private:
51 std::vector<base::Closure> sync_point_callbacks_; 52 std::vector<base::Closure> sync_point_callbacks_;
52 SurfaceVisibleCallback set_visible_callback_; 53 SurfaceVisibleCallback set_visible_callback_;
53 ScheduleOverlayPlaneCallback schedule_overlay_plane_callback_; 54 ScheduleOverlayPlaneCallback schedule_overlay_plane_callback_;
54 55
55 base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_; 56 base::WeakPtrFactory<TestContextSupport> weak_ptr_factory_;
56 57
57 DISALLOW_COPY_AND_ASSIGN(TestContextSupport); 58 DISALLOW_COPY_AND_ASSIGN(TestContextSupport);
58 }; 59 };
59 60
60 } // namespace cc 61 } // namespace cc
61 62
62 #endif // CC_TEST_TEST_CONTEXT_SUPPORT_H_ 63 #endif // CC_TEST_TEST_CONTEXT_SUPPORT_H_
OLDNEW
« no previous file with comments | « no previous file | cc/test/test_context_support.cc » ('j') | content/common/gpu/client/gl_helper_scaling.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698