| 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 #ifndef CC_TEST_LAYER_TREE_PIXEL_TEST_H_ | 5 #ifndef CC_TEST_LAYER_TREE_PIXEL_TEST_H_ |
| 6 #define CC_TEST_LAYER_TREE_PIXEL_TEST_H_ | 6 #define CC_TEST_LAYER_TREE_PIXEL_TEST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 void CopyBitmapToTextureMailboxAsTexture( | 84 void CopyBitmapToTextureMailboxAsTexture( |
| 85 const SkBitmap& bitmap, | 85 const SkBitmap& bitmap, |
| 86 TextureMailbox* texture_mailbox, | 86 TextureMailbox* texture_mailbox, |
| 87 scoped_ptr<SingleReleaseCallback>* release_callback); | 87 scoped_ptr<SingleReleaseCallback>* release_callback); |
| 88 | 88 |
| 89 void ReleaseTextureMailbox(scoped_ptr<gpu::GLInProcessContext> context, | 89 void ReleaseTextureMailbox(scoped_ptr<gpu::GLInProcessContext> context, |
| 90 uint32 texture, | 90 uint32 texture, |
| 91 uint32 sync_point, | 91 uint32 sync_point, |
| 92 bool lost_resource); | 92 bool lost_resource); |
| 93 | 93 |
| 94 void Finish(); |
| 95 |
| 94 void set_enlarge_texture_amount(const gfx::Vector2d& enlarge_texture_amount) { | 96 void set_enlarge_texture_amount(const gfx::Vector2d& enlarge_texture_amount) { |
| 95 enlarge_texture_amount_ = enlarge_texture_amount; | 97 enlarge_texture_amount_ = enlarge_texture_amount; |
| 96 } | 98 } |
| 97 | 99 |
| 98 // Common CSS colors defined for tests to use. | 100 // Common CSS colors defined for tests to use. |
| 99 static const SkColor kCSSOrange = 0xffffa500; | 101 static const SkColor kCSSOrange = 0xffffa500; |
| 100 static const SkColor kCSSBrown = 0xffa52a2a; | 102 static const SkColor kCSSBrown = 0xffa52a2a; |
| 101 static const SkColor kCSSGreen = 0xff008000; | 103 static const SkColor kCSSGreen = 0xff008000; |
| 102 | 104 |
| 103 gfx::DisableNullDrawGLBindings enable_pixel_output_; | 105 gfx::DisableNullDrawGLBindings enable_pixel_output_; |
| 104 scoped_ptr<PixelComparator> pixel_comparator_; | 106 scoped_ptr<PixelComparator> pixel_comparator_; |
| 105 PixelTestType test_type_; | 107 PixelTestType test_type_; |
| 106 scoped_refptr<Layer> content_root_; | 108 scoped_refptr<Layer> content_root_; |
| 107 Layer* readback_target_; | 109 Layer* readback_target_; |
| 108 base::FilePath ref_file_; | 110 base::FilePath ref_file_; |
| 109 scoped_ptr<SkBitmap> result_bitmap_; | 111 scoped_ptr<SkBitmap> result_bitmap_; |
| 110 std::vector<scoped_refptr<TextureLayer>> texture_layers_; | 112 std::vector<scoped_refptr<TextureLayer>> texture_layers_; |
| 111 int pending_texture_mailbox_callbacks_; | 113 int pending_texture_mailbox_callbacks_; |
| 112 gfx::Vector2d enlarge_texture_amount_; | 114 gfx::Vector2d enlarge_texture_amount_; |
| 113 }; | 115 }; |
| 114 | 116 |
| 115 } // namespace cc | 117 } // namespace cc |
| 116 | 118 |
| 117 #endif // CC_TEST_LAYER_TREE_PIXEL_TEST_H_ | 119 #endif // CC_TEST_LAYER_TREE_PIXEL_TEST_H_ |
| OLD | NEW |