Home | History | Annotate | Download | only in hwui

Lines Matching full:bounds

658 void OpenGLRenderer::calculateLayerBoundsAndClip(Rect& bounds, Rect& clip, bool fboLayer) {
659 const Rect untransformedBounds(bounds);
661 currentTransform()->mapRect(bounds);
663 // Layers only make sense if they are in the framebuffer's bounds
664 if (bounds.intersect(*currentClipRect())) {
666 bounds.snapToPixelBoundaries();
669 // need to make sure the layer does not extend outside the bounds
673 if (!bounds.intersect(previousViewport)) {
674 bounds.setEmpty();
676 clip.set(bounds);
683 bounds.set(untransformedBounds);
689 bounds.setEmpty();
693 void OpenGLRenderer::updateSnapshotIgnoreForLayer(const Rect& bounds, const Rect& clip,
695 if (bounds.isEmpty() || bounds.getWidth() > mCaches.maxTextureSize ||
696 bounds.getHeight() > mCaches.maxTextureSize ||
713 Rect bounds(left, top, right, bottom);
715 calculateLayerBoundsAndClip(bounds, clip, true);
716 updateSnapshotIgnoreForLayer(bounds, clip, true, getAlphaDirect(paint));
719 mSnapshot->resetTransform(-bounds.left, -bounds.top, 0.0f);
721 mSnapshot->initializeViewport(bounds.getWidth(), bounds.getHeight());
733 * layer is created and a shape intersecting the bounds of the layers and the
753 * frame buffer contained within the layer's bounds is copied into this texture
789 Rect bounds(left, top, right, bottom);
790 calculateLayerBoundsAndClip(bounds, clip, fboLayer);
791 updateSnapshotIgnoreForLayer(bounds, clip, fboLayer, getAlphaDirect(paint));
799 Layer* layer = mCaches.layerCache.get(mRenderState, bounds.getWidth(), bounds.getHeight());
805 layer->layer.set(bounds);
806 layer->texCoords.set(0.0f, bounds.getHeight() / float(layer->getHeight()),
807 bounds.getWidth() / float(layer->getWidth()), 0.0f);
819 return createFboLayer(layer, bounds, clip);
823 if (!bounds.isEmpty()) {
835 bounds.left, getViewportHeight() - bounds.bottom,
836 bounds.getWidth(), bounds.getHeight());
839 mLayers.push(new Rect(bounds));
846 bool OpenGLRenderer::createFboLayer(Layer* layer, Rect& bounds, Rect& clip) {
853 mSnapshot->resetTransform(-bounds.left, -bounds.top, 0.0f);
855 mSnapshot->initializeViewport(bounds.getWidth(), bounds.getHeight());
878 mCaches.setScissor(clip.left - 1.0f, bounds.getHeight() - clip.bottom - 1.0f,
885 mRenderState.setViewport(bounds.getWidth(), bounds.getHeight());
1276 Rect bounds(left, top, right, bottom);
1277 transform.mapRect(bounds);
1278 dirtyLayerUnchecked(bounds, getRegion());
1285 Rect bounds(left, top, right, bottom);
1286 dirtyLayerUnchecked(bounds, getRegion());
1290 void OpenGLRenderer::dirtyLayerUnchecked(Rect& bounds, Region* region) {
1291 if (bounds.intersect(*currentClipRect())) {
1292 bounds.snapToPixelBoundaries();
1293 android::Rect dirty(bounds.left, bounds.top, bounds.right, bounds.bottom);
1325 // The list contains bounds that have already been clipped
1334 Rect* bounds = mLayers.itemAt(i);
1336 Vertex::set(vertex++, bounds->left, bounds->top);
1337 Vertex::set(vertex++, bounds->right, bounds->top);
1338 Vertex::set(vertex++, bounds->left, bounds->bottom);
1339 Vertex::set(vertex++, bounds->right, bounds->bottom);
1341 delete bounds;
1379 // state has bounds initialized in local coordinates
1403 // Empty bounds implies size unknown. Label op as conservatively clipped to disable
1509 // to the region's bounds
1552 * Returns false and sets scissor enable based upon bounds if drawing won't be clipped out.
1554 * @param paint if not null, the bounds will be expanded to account for stroke depending on paint
2019 const Rect& bounds, const SkPaint* paint) {
2029 const float x = (int) floorf(bounds.left + 0.5f);
2030 const float y = (int) floorf(bounds.top + 0.5f);
2032 drawAlpha8TextureMesh(x, y, x + bounds.getWidth(), y + bounds.getHeight(),
2037 drawTextureMesh(x, y, x + bounds.getWidth(), y + bounds.getHeight(),
2089 // TODO: use quickReject on bounds from vertices
2326 const Rect& bounds = mesh->quads.itemAt(i);
2328 const float x = (int) floorf(bounds.left + offsetX + 0.5f);
2329 const float y = (int) floorf(bounds.top + offsetY + 0.5f);
2330 dirtyLayer(x, y, x + bounds.getWidth(), y + bounds.getHeight());
2332 dirtyLayer(left + bounds.left, top + bounds.top,
2333 left + bounds.right, top + bounds.bottom, *currentTransform());
2388 Rect bounds(vertexBuffer.getBounds());
2389 bounds.translate(translateX, translateY);
2390 dirtyLayer(bounds.left, bounds.top, bounds.right, bounds.bottom, *currentTransform());
2480 const Rect& bounds = buffer.getBounds();
2482 if (quickRejectSetupScissor(bounds.left, bounds.top, bounds.right, bounds.bottom)) {
2498 const Rect& bounds = buffer.getBounds();
2499 if (quickRejectSetupScissor(bounds.left, bounds.top, bounds.right, bounds.bottom)) {
2764 Rect bounds(FLT_MAX / 2.0f, FLT_MAX / 2.0f, FLT_MIN / 2.0f, FLT_MIN / 2.0f);
2770 positions, hasActiveLayer ? &bounds : NULL, &functor)) {
2773 currentTransform()->mapRect(bounds);
2775 dirtyLayerUnchecked(bounds, getRegion());
2804 const float* positions, const SkPaint* paint, float totalAdvance, const Rect& bounds,
2811 quickRejectSetupScissor(bounds)) {
2896 // TODO: avoid scissor by calculating maximum bounds using path bounds + font metrics
2909 Rect bounds(FLT_MAX / 2.0f, FLT_MAX / 2.0f, FLT_MIN / 2.0f, FLT_MIN / 2.0f);
2914 hOffset, vOffset, hasActiveLayer ? &bounds : NULL, &functor)) {
2916 currentTransform()->mapRect(bounds);
2917 dirtyLayerUnchecked(bounds, getRegion());