Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply dirty rect updates consistently. #2856

Merged
merged 3 commits into from Jul 5, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Remove epoch from ImageResource as unused.

  • Loading branch information
aosmond committed Jul 5, 2018
commit 29649025618aad191032c8220e0f2b950d5dccd0
@@ -1892,7 +1892,6 @@ impl<'a> DisplayListFlattener<'a> {
rendering: image_rendering,
tile: None,
},
current_epoch: Epoch::invalid(),
alpha_type,
stretch_size,
tile_spacing,
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

use api::{AlphaType, BorderRadius, BoxShadowClipMode, BuiltDisplayList, ClipMode, ColorF};
use api::{DeviceIntRect, DeviceIntSize, DevicePixelScale, Epoch, ExtendMode};
use api::{DeviceIntRect, DeviceIntSize, DevicePixelScale, ExtendMode};
use api::{FilterOp, GlyphInstance, GradientStop, ImageKey, ImageRendering, ItemRange, ItemTag, TileOffset};
use api::{GlyphRasterSpace, LayoutPoint, LayoutRect, LayoutSize, LayoutToWorldTransform, LayoutVector2D};
use api::{PipelineId, PremultipliedColorF, PropertyBinding, Shadow, YuvColorSpace, YuvFormat, DeviceIntSideOffsets};
@@ -284,7 +284,6 @@ pub enum BrushKind {
},
Image {
request: ImageRequest,
current_epoch: Epoch,
alpha_type: AlphaType,
stretch_size: LayoutSize,
tile_spacing: LayoutSize,
@@ -1577,7 +1576,6 @@ impl PrimitiveStore {
sub_rect,
stretch_size,
ref mut tile_spacing,
ref mut current_epoch,
ref mut source,
ref mut opacity_binding,
ref mut visible_tiles,
@@ -1590,7 +1588,6 @@ impl PrimitiveStore {

// Set if we need to request the source image from the cache this frame.
if let Some(image_properties) = image_properties {
*current_epoch = image_properties.epoch;
is_tiled = image_properties.tiling.is_some();

// If the opacity changed, invalidate the GPU cache so that
@@ -5,7 +5,7 @@
use api::{AddFont, BlobImageResources, ResourceUpdate};
use api::{BlobImageDescriptor, BlobImageError, BlobImageRenderer, BlobImageRequest};
use api::{ClearCache, ColorF, DevicePoint, DeviceUintPoint, DeviceUintRect, DeviceUintSize};
use api::{Epoch, FontInstanceKey, FontKey, FontTemplate, GlyphIndex};
use api::{FontInstanceKey, FontKey, FontTemplate, GlyphIndex};
use api::{ExternalImageData, ExternalImageType};
use api::{FontInstanceOptions, FontInstancePlatformOptions, FontVariation};
use api::{GlyphDimensions, IdNamespace};
@@ -86,7 +86,6 @@ pub struct ImageProperties {
pub descriptor: ImageDescriptor,
pub external_image: Option<ExternalImageData>,
pub tiling: Option<TileSize>,
pub epoch: Epoch,
}

#[derive(Debug, Copy, Clone, PartialEq)]
@@ -100,7 +99,6 @@ enum State {
struct ImageResource {
data: ImageData,
descriptor: ImageDescriptor,
epoch: Epoch,
tiling: Option<TileSize>,
}

@@ -572,7 +570,6 @@ impl ResourceCache {
let resource = ImageResource {
descriptor,
data,
epoch: Epoch(0),
tiling,
};

@@ -621,7 +618,6 @@ impl ResourceCache {
*image = ImageResource {
descriptor,
data,
epoch: Epoch(image.epoch.0 + 1),
tiling,
};
}
@@ -992,7 +988,6 @@ impl ResourceCache {
descriptor: image_template.descriptor,
external_image,
tiling: image_template.tiling,
epoch: image_template.epoch,
}
})
}
@@ -1250,7 +1245,6 @@ enum PlainFontTemplate {
struct PlainImageTemplate {
data: String,
descriptor: ImageDescriptor,
epoch: Epoch,
tiling: Option<TileSize>,
}

@@ -1449,7 +1443,6 @@ impl ResourceCache {
},
descriptor: template.descriptor.clone(),
tiling: template.tiling,
epoch: template.epoch,
})
})
.collect(),
@@ -1574,7 +1567,6 @@ impl ResourceCache {
data,
descriptor: template.descriptor,
tiling: template.tiling,
epoch: template.epoch,
});
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.