| 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 set_enlarge_texture_amount(const gfx::Vector2d& enlarge_texture_amount) { |
| 95 enlarge_texture_amount_ = enlarge_texture_amount; |
| 96 } |
| 97 |
| 94 // Common CSS colors defined for tests to use. | 98 // Common CSS colors defined for tests to use. |
| 95 static const SkColor kCSSOrange = 0xffffa500; | 99 static const SkColor kCSSOrange = 0xffffa500; |
| 96 static const SkColor kCSSBrown = 0xffa52a2a; | 100 static const SkColor kCSSBrown = 0xffa52a2a; |
| 97 static const SkColor kCSSGreen = 0xff008000; | 101 static const SkColor kCSSGreen = 0xff008000; |
| 98 | 102 |
| 99 gfx::DisableNullDrawGLBindings enable_pixel_output_; | 103 gfx::DisableNullDrawGLBindings enable_pixel_output_; |
| 100 scoped_ptr<PixelComparator> pixel_comparator_; | 104 scoped_ptr<PixelComparator> pixel_comparator_; |
| 101 PixelTestType test_type_; | 105 PixelTestType test_type_; |
| 102 scoped_refptr<Layer> content_root_; | 106 scoped_refptr<Layer> content_root_; |
| 103 Layer* readback_target_; | 107 Layer* readback_target_; |
| 104 base::FilePath ref_file_; | 108 base::FilePath ref_file_; |
| 105 scoped_ptr<SkBitmap> result_bitmap_; | 109 scoped_ptr<SkBitmap> result_bitmap_; |
| 106 std::vector<scoped_refptr<TextureLayer>> texture_layers_; | 110 std::vector<scoped_refptr<TextureLayer>> texture_layers_; |
| 107 int pending_texture_mailbox_callbacks_; | 111 int pending_texture_mailbox_callbacks_; |
| 108 bool impl_side_painting_; | 112 bool impl_side_painting_; |
| 113 gfx::Vector2d enlarge_texture_amount_; |
| 109 }; | 114 }; |
| 110 | 115 |
| 111 } // namespace cc | 116 } // namespace cc |
| 112 | 117 |
| 113 #endif // CC_TEST_LAYER_TREE_PIXEL_TEST_H_ | 118 #endif // CC_TEST_LAYER_TREE_PIXEL_TEST_H_ |
| OLD | NEW |