3485 Commits

Author SHA1 Message Date
Matt Sarett
79756be175 Add layer updates debugging feature to Skia pipelines
When this property is turned on, we flash green
every time a hardware layer is updated.

Test: Matches the behavior in OpenGLPipeline

BUG:32370375

Change-Id: I916f94eee644c185d8a3f9fa4cd69e087ed1e92d
2016-11-16 15:17:04 -05:00
TreeHugger Robot
e3d281ea18 Merge "Add debug memory tracking to SkiaGLPipeline" 2016-11-08 01:15:33 +00:00
Matt Sarett
4bda6bfaa6 Add debug memory tracking to SkiaGLPipeline
Test: Sample output is below

D/OpenGLRenderer: Resource Cache Usage:
D/OpenGLRenderer:       32 items out of 8192 maximum items
D/OpenGLRenderer:  4635572 bytes (4.42 MB) out of 96.00 MB maximum

This is less verbose than OpenGL memory debug output for
two reasons:
(1) SkiaGL has less caches.
(2) SkiaGL does not support printing on cache additions/evictions.
    This seems like more of an internal debugging tool rather than
    a user-facing debug feature.  I think it's best to leave this
    unimplemented until we find that it might be useful.

BUG:32370375

Change-Id: Ib063f1c2a7f88e9840341b1001d227f556d88f26
2016-11-07 16:35:06 -05:00
TreeHugger Robot
9310f59cac Merge "Fix bug with displaying visual profile bars" 2016-11-07 21:32:28 +00:00
Derek Sollenberger
3e62009709 Merge "Refactor pin/unpinImages to work across pipelines." 2016-11-07 20:59:48 +00:00
Derek Sollenberger
1dc5fba2dc Merge "Enable SkiaPipelines to interoperate with existing GlesDriver configs." 2016-11-07 20:42:38 +00:00
Matt Sarett
4c9bbf4eef Fix bug with displaying visual profile bars
Test: Used debugging feature.

BUG:32370375

Change-Id: I56e4e2155566a219ce43882e48b327123edccfe2
2016-11-07 14:23:33 -05:00
Derek Sollenberger
7e044fef62 Enable SkiaPipelines to interoperate with existing GlesDriver configs.
Test: hwui unit tests
Change-Id: Icd94d0e21130d86fb5514801f999d0018a69e151
2016-11-07 10:59:20 -05:00
Derek Sollenberger
b7d34b64dd Refactor pin/unpinImages to work across pipelines.
Test: existing CTS tests still pass
Change-Id: Ib2607e9853396bad42f298829b5c5da0d210af32
2016-11-07 10:05:56 -05:00
Seigo Nonaka
4b56177429 Merge "Make sure the Typeface is loaded before calling measureText." 2016-11-07 05:22:52 +00:00
John Reck
437d4e0daf Merge "Re-unite sources with their headers" 2016-11-04 19:32:06 +00:00
TreeHugger Robot
3d36fac235 Merge "Add SkiaProfileRenderer to draw visual debugging info" 2016-11-04 12:53:40 +00:00
Matt Sarett
cf2c05c652 Add SkiaProfileRenderer to draw visual debugging info
This adds support for debug.hwui.profile and
debug.hwui.show_dirty_regions to the Skia pipelines.

There still may be some follow up work for profiling
with visual bars.  The speed at which the renderer
is able to draw the rects in the graph is having a
noticeable effect on the actual data in the graphs.

Test: Verified that the features work as expected.

BUG:32370375

Change-Id: I24430da2bab3eb54f6a771f9c984f8ae0008a5a7
2016-11-03 21:42:58 -04:00
John Reck
f6113af2d6 Re-unite sources with their headers
Move all the includes for androidfw under
a common base path for that library instead
of frameworks/base/includes.

Also fixes -Werror issues that resulted in
no longer being -isystem.

Test: builds
Change-Id: Ic4312eb61b197af114dded5691d5ae1ec82923f7
2016-11-03 16:26:59 -07:00
TreeHugger Robot
eea591b08e Merge "Fix RenderNodeDrawable to draw nonzero Z nodes when needed" 2016-11-03 22:30:11 +00:00
TreeHugger Robot
18da04ed2c Merge "Implement onDrawTextBlob in the SkiaCanvasProxy." 2016-11-03 20:04:18 +00:00
TreeHugger Robot
40800725d2 Merge "Implement Skia pipelines for OpenGL and Vulkan." 2016-11-03 19:59:46 +00:00
TreeHugger Robot
1106b82ea1 Merge "Reference ctable when adopting pointer in Bitmap" 2016-11-03 19:43:33 +00:00
TreeHugger Robot
c96468b062 Merge "update callers to newer Skia APIs" 2016-11-03 19:27:47 +00:00
Stan Iliev
2f06e8ad1a Fix RenderNodeDrawable to draw nonzero Z nodes when needed
Fix RenderNodeDrawable to draw nonzero Z nodes if not in a reordering
section.
Write an unit test modeled after FrameBuilder zReorder, which
verifies the bug fix.

Test: built and run unit tests on angler-eng.
bug: 32541103
Change-Id: Ifbf2d51f4432f5de3af4abe5987c2a72fed14185
2016-11-03 13:44:41 -04:00
Derek Sollenberger
09bd6c201d Implement onDrawTextBlob in the SkiaCanvasProxy.
Test: hwui_unit_tests now pass
Bug: 30353290
Change-Id: I26c98be394e9dbd1cf63fe3eac18cb090403ace7
2016-11-03 17:41:44 +00:00
Stan Iliev
500a0c30d4 Implement Skia pipelines for OpenGL and Vulkan.
Implement Skia pipelines for OpenGL and Vulkan:
base SkiaPipeline, SkiaOpenGLPipeline and SkiaVulkanPipeline.
Write unit tests for SkiaPipeline.

Test: Built and run manually on angler-eng.
Change-Id: Ie02583426cb3547541ad9bf91700602a6163ff58
2016-11-03 13:28:49 -04:00
John Reck
f0503b0b6f Merge "Add benchmarks for View inflation" 2016-11-03 17:14:57 +00:00
sergeyv
003f142562 Reference ctable when adopting pointer in Bitmap
Change-Id: I56aea10928f0ec73756ed055488a3e3516a9096e
Test: manual.
bug:32621254, 32561595
2016-11-03 10:04:28 -07:00
Mike Reed
ab12c1fe73 update callers to newer Skia APIs
Test: refactoring CL. Existing unit tests still pass.

Change-Id: I47e73e00f14f78dd9d4c48a142ac9853e7e4cad7
2016-11-03 12:58:42 -04:00
John Reck
3acf0382da Add benchmarks for View inflation
Also speed up RenderNode creation:

Use finalizer() instead of NativeAllocationRegistry, this
shaves ~3us off of creation currently

Avoid instanceof, instead have SurfaceView explicitly ask
for updates.

Remove unused method call.

Test: ran benchmarks
Change-Id: I3117fdf72313a4e6a9965baca9f2a8b855c19b34
2016-11-02 14:49:51 -07:00
Ben Wagner
52d5a55614 Merge "Replace SkAutoTUnref with sk_sp." 2016-11-02 20:32:02 +00:00
Ben Wagner
18bd88534a Replace SkAutoTUnref with sk_sp.
Skia would like to remove SkAutoTUnref and replace it with sk_sp.
This also removes the last SkAutoTDelete straggler.

Change-Id: Idd46fcbbffe7fc1edb243b82b1c2f5425ccd60b6
2016-11-02 16:30:50 +00:00
Derek Sollenberger
f87da67df9 Adding changes required by the master-skia merge.
Test: compile only
Change-Id: I39637a20da439edbf2831952df9bfa12da78e9b9
2016-11-02 11:37:13 -04:00
Mike Reed
c2f31df8b3 use SkBlendMode
skbug.com/5814

Test: compile only
Change-Id: Ibbaff43df1117b2ca77fd8f917f03d88cc476330
(cherry picked from commit 26edbcba8a2ed4cb300e7f87e679e3b73cec2772)
2016-11-02 11:36:48 -04:00
Sergei Vasilinetc
97cc85fd4b Merge "Routine to upload hardware bitmaps" 2016-11-01 19:32:19 +00:00
sergeyv
694d499662 Routine to upload hardware bitmaps
Change-Id: Id8283a0975325e6830d55fd1e33c5f292a1e9be0
Test: refactoring cl.
bug:30999911
2016-10-31 16:11:21 -07:00
Stan Iliev
021693b967 Implement SkiaRecordingCanvas, RenderNodeDrawable and other drawables.
Implement SkiaRecordingCanvas, RenderNodeDrawable, GLFunctorDrawable,
LayerDrawable, StartReorderBarrierDrawable, EndReorderBarrierDrawable.
Move AnimatedRoundRect and AnimatedCircle in a separate file.
All Skia pipeline files are moved in hwui/pipeline/skia folder.
Add unit tests for RenderNodeDrawable, StartReorderBarrierDrawable,
EndReorderBarrierDrawable and SkiaRecordingCanvas.

Test: I tested manually on 6P devices and did run the unit tests.
Change-Id: If2a347bd1fc4689953822294ce5bf98c7f3f57c7
2016-10-31 14:27:02 -04:00
Derek Sollenberger
96f4410a57 Merge "Refactor mock Functors into a common TestUtils class." 2016-10-28 20:17:56 +00:00
Derek Sollenberger
835b3a69c3 Refactor mock Functors into a common TestUtils class.
Test: refactor. existing tests still pass
Change-Id: I55258487c371869a5b91dd2dcf6bf7bd47ac1a35
2016-10-28 13:58:09 -04:00
Derek Sollenberger
c0f50362c7 Merge changes If99865cd,I5b794c94
* changes:
  Fix test breakage due to naming collision in the linker.
  Minor cleanup of unused headers and overly described functions.
2016-10-28 17:13:22 +00:00
Derek Sollenberger
5ef78a895b Fix test breakage due to naming collision in the linker.
Test: hwui_unit_tests in question now run successfully.
Change-Id: If99865cd1cfa5c819338d062f5685700380a60a6
2016-10-28 11:08:50 -04:00
Derek Sollenberger
050bb6a2b0 Minor cleanup of unused headers and overly described functions.
Test: local compile
Change-Id: I5b794c9473f6d3a9e1d4f9365c951c7ce9dade50
2016-10-28 11:08:27 -04:00
Sergei Vasilinetc
fda66672fe Merge changes I94b1c31c,Ib0b16c87
* changes:
  Add target to texture
  Use Bitmap in Texture.upload
2016-10-28 01:31:00 +00:00
TreeHugger Robot
c024377dcf Merge "Implement getTransparentRegion() using SkLatticeIter" 2016-10-27 14:13:19 +00:00
Matt Sarett
7de7385897 Implement getTransparentRegion() using SkLatticeIter
This allows us to delete utils/NinePatchImpl.cpp and
utils/NinePatch.h

Test: Passed cts tests - DrawableTest, NinePatchTest,
NinePatchDrawableTest.

Change-Id: I6b5d09fa3479e758d8b931fa0e977c25f4435a7c
2016-10-27 08:22:38 -04:00
Seigo Nonaka
e2179925df Make sure the Typeface is loaded before calling measureText.
This is a clean up CL by resolving TODO in hwui/Typeface.cpp

Usually Typeface is listed in preloaded-classes and loaded during Zygote
initialization. However, on some devices, class preloading is disabled.
Paint.measureText can not be called before Typeface static initializer
and it may not load Typeface class.

To ensure that the font preloading happens in ZygoteInit even on such
devices, refer Typeface.DEFAULT static field in TextView.preloadFontCache
in TextView which also happens during zygote initialization.

Bug: 32374752
Test: Manually done
Change-Id: I773c154671c170bebad3aa0f9c04eee5a664b849
2016-10-27 18:18:49 +09:00
sergeyv
2a38c42e92 Add target to texture
Test: refactoring cl.
bug:32413624

Change-Id: I94b1c31cd4e0712dfcfd7777a0012424c1bf0dca
2016-10-26 14:01:09 -07:00
sergeyv
98fa4f9e7b Use Bitmap in Texture.upload
Test: refactoring cl.
bug:32216791

Change-Id: Ib0b16c878d8371e0471e9a502f55626ec5999c60
2016-10-26 13:57:38 -07:00
Derek Sollenberger
daf7229047 Move OpenGL specific details behind renderPipeline interface.
Test: new and existing unit tests still pass.
Change-Id: I6164f30f45ebe450788ed8d949eca5af9a44e585
2016-10-26 12:46:57 +00:00
Derek Sollenberger
be9a73063c Merge "Store GrContext on RenderThread for use by Skia-based renderers." 2016-10-26 12:46:30 +00:00
Matt Sarett
de97307362 Make FrameInfoVisualizer use an IRenderPipeline to draw
Removing the direct uses of the BakedOpRenderer should make
it easier for the SkiaGL pipeline to take advantage of these
debugging features.

Test: Verified that debug.hwui.show_dirty_regions and
debug.hwui.profile still behave as expected.

BUG:32370375

Change-Id: I2818bda4a18ec183c9c39ca080ad34a4dc89b5cd
2016-10-25 17:44:55 -04:00
Derek Sollenberger
98f75d53db Store GrContext on RenderThread for use by Skia-based renderers.
Test: built and booted on device
Change-Id: I4c1060ec72bc67e54e6b2d25b1f2c13aaa513f89
2016-10-25 19:43:00 +00:00
Seigo Nonaka
6af8c0968e Merge "Revert "Remove obsolete interface GetTable."" 2016-10-25 03:58:02 +00:00
Seigo Nonaka
436f8ac786 Revert "Remove obsolete interface GetTable."
This reverts commit 9cd73b6828e4e7475ab430c373efa2cd6dc69cea.

This causes a crash on Android Auto.
Bug: 32374752

Change-Id: I7fd0a52eb2458772ff50f246ca1c7d3397554133
2016-10-25 00:49:14 +00:00