summaryrefslogtreecommitdiff
path: root/libs/hwui/GlopBuilder.cpp
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2016-04-25 14:55:27 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-04-25 14:55:28 +0000
commita5bbbe55b74d3a835b64fa18959f487da2df967e (patch)
tree2452869d654feab25ff5cd222dc2fd3fb18418e2 /libs/hwui/GlopBuilder.cpp
parent4ace8366619d04d326505ad689c5d43707f2aaea (diff)
parent2f78327cfcd4c7b23aae9bb0262e64050d093a64 (diff)
Merge "PixelCopy fixes" into nyc-dev
Diffstat (limited to 'libs/hwui/GlopBuilder.cpp')
-rw-r--r--libs/hwui/GlopBuilder.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/hwui/GlopBuilder.cpp b/libs/hwui/GlopBuilder.cpp
index 7d4f4100313f..fdbe76a5e459 100644
--- a/libs/hwui/GlopBuilder.cpp
+++ b/libs/hwui/GlopBuilder.cpp
@@ -471,6 +471,21 @@ GlopBuilder& GlopBuilder::setFillTextureLayer(Layer& layer, float alpha) {
return *this;
}
+GlopBuilder& GlopBuilder::setFillExternalTexture(Texture& texture) {
+ TRIGGER_STAGE(kFillStage);
+ REQUIRE_STAGES(kMeshStage | kRoundRectClipStage);
+
+ mOutGlop->fill.texture = { &texture,
+ GL_TEXTURE_EXTERNAL_OES, GL_LINEAR, GL_CLAMP_TO_EDGE,
+ nullptr };
+
+ setFill(SK_ColorWHITE, 1.0f, SkXfermode::kSrc_Mode, Blend::ModeOrderSwap::NoSwap,
+ nullptr, nullptr);
+
+ mDescription.modulate = mOutGlop->fill.color.a < 1.0f;
+ return *this;
+}
+
////////////////////////////////////////////////////////////////////////////////
// Transform
////////////////////////////////////////////////////////////////////////////////