Implement MoveFileLocal (with creating a snapshot).
[chromium-blink-merge.git] / ui / gfx / gfx.gyp
blob84e53d788e2c113b4c4d2d7bd0b2423d5eaed151
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6   'variables': {
7     'chromium_code': 1,
8   },
9   'targets': [
10     {
11       'target_name': 'gfx_geometry',
12       'type': '<(component)',
13       'dependencies': [
14         '<(DEPTH)/base/base.gyp:base',
15       ],
16       'defines': [
17         'GFX_IMPLEMENTATION',
18       ],
19       'sources': [
20         'geometry/box_f.cc',
21         'geometry/box_f.h',
22         'geometry/cubic_bezier.cc',
23         'geometry/cubic_bezier.h',
24         'geometry/dip_util.cc',
25         'geometry/dip_util.h',
26         'geometry/insets.cc',
27         'geometry/insets.h',
28         'geometry/insets_base.h',
29         'geometry/insets_f.cc',
30         'geometry/insets_f.h',
31         'geometry/matrix3_f.cc',
32         'geometry/matrix3_f.h',
33         'geometry/point.cc',
34         'geometry/point.h',
35         'geometry/point3_f.cc',
36         'geometry/point3_f.h',
37         'geometry/point_conversions.cc',
38         'geometry/point_conversions.h',
39         'geometry/point_f.cc',
40         'geometry/point_f.h',
41         'geometry/quad_f.cc',
42         'geometry/quad_f.h',
43         'geometry/r_tree.h',
44         'geometry/r_tree_base.cc',
45         'geometry/r_tree_base.h',
46         'geometry/rect.cc',
47         'geometry/rect.h',
48         'geometry/rect_conversions.cc',
49         'geometry/rect_conversions.h',
50         'geometry/rect_f.cc',
51         'geometry/rect_f.h',
52         'geometry/safe_integer_conversions.h',
53         'geometry/scroll_offset.cc',
54         'geometry/scroll_offset.h',
55         'geometry/size.cc',
56         'geometry/size.h',
57         'geometry/size_conversions.cc',
58         'geometry/size_conversions.h',
59         'geometry/size_f.cc',
60         'geometry/size_f.h',
61         'geometry/vector2d.cc',
62         'geometry/vector2d.h',
63         'geometry/vector2d_conversions.cc',
64         'geometry/vector2d_conversions.h',
65         'geometry/vector2d_f.cc',
66         'geometry/vector2d_f.h',
67         'geometry/vector3d_f.cc',
68         'geometry/vector3d_f.h',
69       ],
70       'includes': [
71         '../../build/android/increase_size_for_speed.gypi',
72       ],
73     },
74     {
75       'target_name': 'gfx',
76       'type': '<(component)',
77       'dependencies': [
78         '<(DEPTH)/base/base.gyp:base',
79         '<(DEPTH)/base/base.gyp:base_i18n',
80         '<(DEPTH)/base/base.gyp:base_static',
81         '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
82         '<(DEPTH)/skia/skia.gyp:skia',
83         '<(DEPTH)/third_party/harfbuzz-ng/harfbuzz.gyp:harfbuzz-ng',
84         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
85         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
86         '<(DEPTH)/third_party/libpng/libpng.gyp:libpng',
87         '<(DEPTH)/third_party/zlib/zlib.gyp:zlib',
88         'gfx_geometry',
89       ],
90       # text_elider.h includes ICU headers.
91       'export_dependent_settings': [
92         '<(DEPTH)/skia/skia.gyp:skia',
93         '<(DEPTH)/third_party/icu/icu.gyp:icui18n',
94         '<(DEPTH)/third_party/icu/icu.gyp:icuuc',
95       ],
96       'defines': [
97         'GFX_IMPLEMENTATION',
98       ],
99       'include_dirs': [
100         '<(DEPTH)/third_party/icu/source/common'
101       ],
102       'sources': [
103         'android/device_display_info.cc',
104         'android/device_display_info.h',
105         'android/gfx_jni_registrar.cc',
106         'android/gfx_jni_registrar.h',
107         'android/java_bitmap.cc',
108         'android/java_bitmap.h',
109         'android/shared_device_display_info.cc',
110         'android/shared_device_display_info.h',
111         'android/view_configuration.cc',
112         'android/view_configuration.h',
113         'animation/animation.cc',
114         'animation/animation.h',
115         'animation/animation_container.cc',
116         'animation/animation_container.h',
117         'animation/animation_container_element.h',
118         'animation/animation_container_observer.h',
119         'animation/animation_delegate.h',
120         'animation/linear_animation.cc',
121         'animation/linear_animation.h',
122         'animation/multi_animation.cc',
123         'animation/multi_animation.h',
124         'animation/slide_animation.cc',
125         'animation/slide_animation.h',
126         'animation/throb_animation.cc',
127         'animation/throb_animation.h',
128         'animation/tween.cc',
129         'animation/tween.h',
130         'blit.cc',
131         'blit.h',
132         'break_list.h',
133         'canvas.cc',
134         'canvas.h',
135         'canvas_notimplemented.cc',
136         'canvas_paint_mac.h',
137         'canvas_paint_mac.mm',
138         'canvas_paint_win.cc',
139         'canvas_paint_win.h',
140         'canvas_skia.cc',
141         'canvas_skia_paint.h',
142         'codec/jpeg_codec.cc',
143         'codec/jpeg_codec.h',
144         'codec/png_codec.cc',
145         'codec/png_codec.h',
146         'color_analysis.cc',
147         'color_analysis.h',
148         'color_profile.cc',
149         'color_profile.h',
150         'color_profile_mac.mm',
151         'color_profile_win.cc',
152         'color_utils.cc',
153         'color_utils.h',
154         'display.cc',
155         'display.h',
156         'display_change_notifier.cc',
157         'display_change_notifier.h',
158         'display_observer.cc',
159         'display_observer.h',
160         'favicon_size.cc',
161         'favicon_size.h',
162         'font.cc',
163         'font.h',
164         'font_fallback.h',
165         'font_fallback_linux.cc',
166         'font_fallback_mac.mm',
167         'font_fallback_win.cc',
168         'font_fallback_win.h',
169         'font_list.cc',
170         'font_list.h',
171         'font_list_impl.cc',
172         'font_list_impl.h',
173         'font_render_params.cc',
174         'font_render_params.h',
175         'font_render_params_android.cc',
176         'font_render_params_linux.cc',
177         'font_render_params_mac.cc',
178         'font_render_params_win.cc',
179         'frame_time.h',
180         'gfx_export.h',
181         'gfx_paths.cc',
182         'gfx_paths.h',
183         'gpu_memory_buffer.cc',
184         'gpu_memory_buffer.h',
185         'harfbuzz_font_skia.cc',
186         'harfbuzz_font_skia.h',
187         'hud_font.cc',
188         'hud_font.h',
189         'image/canvas_image_source.cc',
190         'image/canvas_image_source.h',
191         'image/image.cc',
192         'image/image.h',
193         'image/image_family.cc',
194         'image/image_family.h',
195         'image/image_ios.mm',
196         'image/image_mac.mm',
197         'image/image_png_rep.cc',
198         'image/image_png_rep.h',
199         'image/image_skia.cc',
200         'image/image_skia.h',
201         'image/image_skia_operations.cc',
202         'image/image_skia_operations.h',
203         'image/image_skia_rep.cc',
204         'image/image_skia_rep.h',
205         'image/image_skia_source.h',
206         'image/image_skia_util_ios.h',
207         'image/image_skia_util_ios.mm',
208         'image/image_skia_util_mac.h',
209         'image/image_skia_util_mac.mm',
210         'image/image_util.cc',
211         'image/image_util.h',
212         'image/image_util_ios.mm',
213         'interpolated_transform.cc',
214         'interpolated_transform.h',
215         'ios/NSString+CrStringDrawing.h',
216         'ios/NSString+CrStringDrawing.mm',
217         'ios/uikit_util.h',
218         'ios/uikit_util.mm',
219         'linux_font_delegate.cc',
220         'linux_font_delegate.h',
221         'mac/coordinate_conversion.h',
222         'mac/coordinate_conversion.mm',
223         'mac/scoped_ns_disable_screen_updates.h',
224         'native_widget_types.h',
225         'nine_image_painter.cc',
226         'nine_image_painter.h',
227         'overlay_transform.h',
228         'path.cc',
229         'path.h',
230         'path_aura.cc',
231         'path_win.cc',
232         'path_win.h',
233         'path_x11.cc',
234         'path_x11.h',
235         'platform_font.h',
236         'platform_font_android.cc',
237         'platform_font_ios.h',
238         'platform_font_ios.mm',
239         'platform_font_linux.cc',
240         'platform_font_linux.h',
241         'platform_font_mac.h',
242         'platform_font_mac.mm',
243         'platform_font_win.cc',
244         'platform_font_win.h',
245         'range/range.cc',
246         'range/range.h',
247         'range/range_f.cc',
248         'range/range_f.h',
249         'range/range_mac.mm',
250         'range/range_win.cc',
251         'render_text.cc',
252         'render_text.h',
253         'render_text_harfbuzz.cc',
254         'render_text_harfbuzz.h',
255         'render_text_mac.cc',
256         'render_text_mac.h',
257         'scoped_canvas.h',
258         'scoped_cg_context_save_gstate_mac.h',
259         'scoped_ns_graphics_context_save_gstate_mac.h',
260         'scoped_ns_graphics_context_save_gstate_mac.mm',
261         'scoped_ui_graphics_push_context_ios.h',
262         'scoped_ui_graphics_push_context_ios.mm',
263         'screen.cc',
264         'screen.h',
265         'screen_android.cc',
266         'screen_aura.cc',
267         'screen_ios.mm',
268         'screen_mac.mm',
269         'screen_win.cc',
270         'screen_win.h',
271         'scrollbar_size.cc',
272         'scrollbar_size.h',
273         'selection_model.cc',
274         'selection_model.h',
275         'sequential_id_generator.cc',
276         'sequential_id_generator.h',
277         'shadow_value.cc',
278         'shadow_value.h',
279         'skbitmap_operations.cc',
280         'skbitmap_operations.h',
281         'skia_util.cc',
282         'skia_util.h',
283         'switches.cc',
284         'switches.h',
285         'sys_color_change_listener.cc',
286         'sys_color_change_listener.h',
287         'text_constants.h',
288         'text_elider.cc',
289         'text_elider.h',
290         'text_utils.cc',
291         'text_utils.h',
292         'text_utils_android.cc',
293         'text_utils_ios.mm',
294         'text_utils_skia.cc',
295         'transform.cc',
296         'transform.h',
297         'transform_util.cc',
298         'transform_util.h',
299         'ui_gfx_exports.cc',
300         'utf16_indexing.cc',
301         'utf16_indexing.h',
302         'vsync_provider.h',
303         'win/direct_write.cc',
304         'win/direct_write.h',
305         'win/dpi.cc',
306         'win/dpi.h',
307         'win/hwnd_util.cc',
308         'win/hwnd_util.h',
309         'win/scoped_set_map_mode.h',
310         'win/singleton_hwnd.cc',
311         'win/singleton_hwnd.h',
312         'win/window_impl.cc',
313         'win/window_impl.h',
314       ],
315       'includes': [
316         '../../build/android/increase_size_for_speed.gypi',
317       ],
318       'conditions': [
319         ['OS=="ios"', {
320           # Linkable dependents need to set the linker flag '-ObjC' in order to
321           # use the categories in this target (e.g. NSString+CrStringDrawing.h).
322           'link_settings': {
323             'xcode_settings': {'OTHER_LDFLAGS': ['-ObjC']},
324           },
325           'sources!': [
326             'codec/jpeg_codec.cc',
327           ],
328         }, {
329           'dependencies': [
330             '<(libjpeg_gyp_path):libjpeg',
331           ],
332         }],
333         # TODO(asvitkine): Switch all platforms to use canvas_skia.cc.
334         #                  http://crbug.com/105550
335         ['use_canvas_skia==1', {
336           'sources!': [
337             'canvas_notimplemented.cc',
338           ],
339         }, {  # use_canvas_skia!=1
340           'sources!': [
341             'canvas_skia.cc',
342           ],
343         }],
344         ['OS=="win"', {
345           'sources': [
346             'gdi_util.cc',
347             'gdi_util.h',
348             'icon_util.cc',
349             'icon_util.h',
350           ],
351           # TODO(jschuh): C4267: http://crbug.com/167187 size_t -> int
352           # C4324 is structure was padded due to __declspec(align()), which is
353           # uninteresting.
354           'msvs_disabled_warnings': [ 4267, 4324 ],
355         }],
356         ['OS=="android"', {
357           'sources!': [
358             'animation/throb_animation.cc',
359             'selection_model.cc',
360           ],
361           'dependencies': [
362             'gfx_jni_headers',
363           ],
364           'link_settings': {
365             'libraries': [
366               '-landroid',
367               '-ljnigraphics',
368             ],
369           },
370         }],
371         ['use_aura==0 and toolkit_views==0', {
372           'sources!': [
373             'nine_image_painter.cc',
374             'nine_image_painter.h',
375           ],
376         }],
377         ['OS=="android" and use_aura==0', {
378           'sources!': [
379             'path.cc',
380           ],
381         }],
382         ['OS=="android" and use_aura==1', {
383           'sources!': [
384             'screen_android.cc',
385           ],
386         }],
387         ['OS=="android" and android_webview_build==0', {
388           'dependencies': [
389             '<(DEPTH)/base/base.gyp:base_java',
390           ],
391         }],
392         ['OS=="android" or OS=="ios"', {
393           'sources!': [
394             'harfbuzz_font_skia.cc',
395             'harfbuzz_font_skia.h',
396             'render_text.cc',
397             'render_text.h',
398             'render_text_harfbuzz.cc',
399             'render_text_harfbuzz.h',
400             'text_utils_skia.cc',
401           ],
402         }],
403         ['use_x11==1', {
404           'dependencies': [
405             '../../build/linux/system.gyp:x11',
406             'x/gfx_x11.gyp:gfx_x11',
407           ],
408         }],
409         ['use_cairo==1', {
410           'dependencies': [
411             '<(DEPTH)/build/linux/system.gyp:pangocairo',
412           ],
413         }],
414         ['desktop_linux==1 or chromeos==1', {
415           'dependencies': [
416             # font_render_params_linux.cc uses fontconfig
417             '<(DEPTH)/build/linux/system.gyp:fontconfig',
418           ],
419         }],
420       ],
421       'target_conditions': [
422         # Need 'target_conditions' to override default filename_rules to include
423         # the file on iOS.
424         ['OS == "ios"', {
425           'sources/': [
426             ['include', '^scoped_cg_context_save_gstate_mac\\.h$'],
427           ],
428         }],
429       ],
430     },
431     {
432       'target_name': 'gfx_test_support',
433       'type': 'static_library',
434       'sources': [
435         'image/image_unittest_util.cc',
436         'image/image_unittest_util.h',
437         'image/image_unittest_util_ios.mm',
438         'image/image_unittest_util_mac.mm',
439         'test/fontconfig_util_linux.cc',
440         'test/fontconfig_util_linux.h',
441         'test/gfx_util.cc',
442         'test/gfx_util.h',
443         'test/ui_cocoa_test_helper.h',
444         'test/ui_cocoa_test_helper.mm',
445       ],
446       'dependencies': [
447         '../../base/base.gyp:base',
448         '../../skia/skia.gyp:skia',
449         '../../testing/gtest.gyp:gtest',
450       ],
451       'conditions': [
452         ['OS == "mac"', {
453           'link_settings': {
454             'libraries': [
455               '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
456             ],
457           },
458         }],
459         ['OS=="ios"', {
460           # The cocoa files don't apply to iOS.
461           'sources/': [
462             ['exclude', 'cocoa']
463           ],
464         }],
465         ['OS=="linux"', {
466           'dependencies': [
467             '../../build/linux/system.gyp:fontconfig',
468           ],
469         }],
470       ],
471     },
472   ],
473   'conditions': [
474     ['OS=="android"' , {
475      'targets': [
476        {
477          'target_name': 'gfx_jni_headers',
478          'type': 'none',
479          'sources': [
480            '../android/java/src/org/chromium/ui/gfx/BitmapHelper.java',
481            '../android/java/src/org/chromium/ui/gfx/DeviceDisplayInfo.java',
482            '../android/java/src/org/chromium/ui/gfx/ViewConfigurationHelper.java',
483          ],
484          'variables': {
485            'jni_gen_package': 'ui/gfx',
486          },
487          'includes': [ '../../build/jni_generator.gypi' ],
488        },
489      ],
490     }],
491   ],