Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1316)

Unified Diff: core/cross/cairo/texture_cairo.cc

Issue 6268006: O2D:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/cross/cairo/texture_cairo.cc
===================================================================
--- core/cross/cairo/texture_cairo.cc (revision 71191)
+++ core/cross/cairo/texture_cairo.cc (working copy)
@@ -114,6 +114,8 @@
goto fail2;
}
+ cairo_set_operator(image_surface_context, CAIRO_OPERATOR_SOURCE);
+
return new TextureCairo(service_locator,
image_surface,
image_surface_context,
@@ -154,6 +156,11 @@
int src_pitch) {
DLOG(INFO) << "Texture2DCairo SetRect";
+ if (0 != level) {
+ // Cairo does not support/need mip-maps.
+ return;
+ }
+
// Create image surface to represent the source.
cairo_surface_t* source_image_surface = cairo_image_surface_create_for_data(
const_cast<unsigned char*>(
@@ -175,9 +182,7 @@
// Discard our reference to the source surface.
cairo_surface_destroy(source_image_surface);
- if (level == 0) {
- TextureUpdated();
- }
+ TextureUpdated();
}
// Locks the given mipmap level of this texture for loading from main memory,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698