Lines Matching defs:bounds
486 void OpenGLRenderer::calculateLayerBoundsAndClip(Rect& bounds, Rect& clip, bool fboLayer) {
487 const Rect untransformedBounds(bounds);
489 currentTransform()->mapRect(bounds);
491 // Layers only make sense if they are in the framebuffer's bounds
492 bounds.doIntersect(mState.currentRenderTargetClip());
493 if (!bounds.isEmpty()) {
495 bounds.snapToPixelBoundaries();
498 // need to make sure the layer does not extend outside the bounds
503 bounds.doIntersect(previousViewport);
504 if (!bounds.isEmpty() && fboLayer) {
505 clip.set(bounds);
513 bounds.set(untransformedBounds);
519 void OpenGLRenderer::updateSnapshotIgnoreForLayer(const Rect& bounds, const Rect& clip,
521 if (bounds.isEmpty() || bounds.getWidth() > mCaches.maxTextureSize ||
522 bounds.getHeight() > mCaches.maxTextureSize ||
539 Rect bounds(left, top, right, bottom);
541 calculateLayerBoundsAndClip(bounds, clip, true);
542 updateSnapshotIgnoreForLayer(bounds, clip, true, PaintUtils::getAlphaDirect(paint));
545 writableSnapshot()->resetTransform(-bounds.left, -bounds.top, 0.0f);
547 writableSnapshot()->initializeViewport(bounds.getWidth(), bounds.getHeight());
559 * layer is created and a shape intersecting the bounds of the layers and the
579 * frame buffer contained within the layer's bounds is copied into this texture
615 Rect bounds(left, top, right, bottom);
616 calculateLayerBoundsAndClip(bounds, clip, fboLayer);
617 updateSnapshotIgnoreForLayer(bounds, clip, fboLayer, PaintUtils::getAlphaDirect(paint));
625 Layer* layer = mCaches.layerCache.get(mRenderState, bounds.getWidth(), bounds.getHeight());
631 layer->layer.set(bounds);
632 layer->texCoords.set(0.0f, bounds.getHeight() / float(layer->getHeight()),
633 bounds.getWidth() / float(layer->getWidth()), 0.0f);
648 return createFboLayer(layer, bounds, clip);
652 if (!bounds.isEmpty()) {
664 bounds.left, getViewportHeight() - bounds.bottom,
665 bounds.getWidth(), bounds.getHeight());
668 mLayers.push_back(Rect(bounds));
675 bool OpenGLRenderer::createFboLayer(Layer* layer, Rect& bounds, Rect& clip) {
682 writableSnapshot()->resetTransform(-bounds.left, -bounds.top, 0.0f);
684 writableSnapshot()->initializeViewport(bounds.getWidth(), bounds.getHeight());
703 mRenderState.scissor().set(clip.left - 1.0f, bounds.getHeight() - clip.bottom - 1.0f,
710 mRenderState.setViewport(bounds.getWidth(), bounds.getHeight());
1025 Rect bounds(left, top, right, bottom);
1026 transform.mapRect(bounds);
1027 dirtyLayerUnchecked(bounds, getRegion());
1034 Rect bounds(left, top, right, bottom);
1035 dirtyLayerUnchecked(bounds, getRegion());
1039 void OpenGLRenderer::dirtyLayerUnchecked(Rect& bounds, Region* region) {
1040 bounds.doIntersect(mState.currentRenderTargetClip());
1041 if (!bounds.isEmpty()) {
1042 bounds.snapToPixelBoundaries();
1043 android::Rect dirty(bounds.left, bounds.top, bounds.right, bounds.bottom);
1060 // The list contains bounds that have already been clipped
1069 const Rect& bounds = mLayers[i];
1071 Vertex::set(vertex++, bounds.left, bounds.top);
1072 Vertex::set(vertex++, bounds.right, bounds.top);
1073 Vertex::set(vertex++, bounds.left, bounds.bottom);
1074 Vertex::set(vertex++, bounds.right, bounds.bottom);
1107 // state has bounds initialized in local coordinates
1132 // Empty bounds implies size unknown. Label op as conservatively clipped to disable
1247 Rect bounds = tr.getBounds();
1249 transform.mapRect(bounds);
1250 bounds.doIntersect(scissorBox);
1251 if (!bounds.isEmpty()) {
1252 handlePointNoTransform(rectangleVertices, bounds.left, bounds.top);
1253 handlePointNoTransform(rectangleVertices, bounds.right, bounds.top);
1254 handlePointNoTransform(rectangleVertices, bounds.left, bounds.bottom);
1255 handlePointNoTransform(rectangleVertices, bounds.right, bounds.bottom);
1258 handlePoint(rectangleVertices, transform, bounds.left, bounds.top);
1259 handlePoint(rectangleVertices, transform, bounds.right, bounds.top);
1260 handlePoint(rectangleVertices, transform, bounds.left, bounds.bottom);
1261 handlePoint(rectangleVertices, transform, bounds.right, bounds.bottom);
1304 // to the region's bounds
1354 * Returns false and sets scissor enable based upon bounds if drawing won't be clipped out.
1356 * @param paint if not null, the bounds will be expanded to account for stroke depending on paint
1417 dirtyLayer(glop.bounds.left, glop.bounds.top, glop.bounds.right, glop.bounds.bottom);
1462 const Rect& bounds, const SkPaint* paint) {
1471 const float x = floorf(bounds.left + 0.5f);
1472 const float y = floorf(bounds.top + 0.5f);
1483 .setModelViewOffsetRectOptionalSnap(snap, x, y, Rect(bounds.getWidth(), bounds.getHeight()))
1652 .setModelViewOffsetRectSnap(left, top, Rect(right - left, bottom - top)) // TODO: get minimal bounds from patch
1669 // TODO: get correct bounds from caller
1743 const Rect& bounds = buffer.getBounds();
1745 if (quickRejectSetupScissor(bounds.left, bounds.top, bounds.right, bounds.bottom)) {
1761 const Rect& bounds = buffer.getBounds();
1762 if (quickRejectSetupScissor(bounds.left, bounds.top, bounds.right, bounds.bottom)) {
2096 const float* positions, const SkPaint* paint, float totalAdvance, const Rect& bounds,
2103 quickRejectSetupScissor(bounds)) {
2190 // TODO: avoid scissor by calculating maximum bounds using path bounds + font metrics
2207 Rect bounds(FLT_MAX / 2.0f, FLT_MAX / 2.0f, FLT_MIN / 2.0f, FLT_MIN / 2.0f);
2210 hOffset, vOffset, hasLayer() ? &bounds : nullptr, &functor)) {
2211 dirtyLayer(bounds.left, bounds.top, bounds.right, bounds.bottom, *currentTransform());