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

Unified Diff: content/browser/renderer_host/image_transport_factory.cc

Issue 10941017: Change the scale factor of texture_size from the layer's one to an estimation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
Index: content/browser/renderer_host/image_transport_factory.cc
diff --git a/content/browser/renderer_host/image_transport_factory.cc b/content/browser/renderer_host/image_transport_factory.cc
index 190673021bf51c8db21f5e7713a999fb89fdbeb1..77bc3794c8c5987c4a69b8887783dc345f0df4e7 100644
--- a/content/browser/renderer_host/image_transport_factory.cc
+++ b/content/browser/renderer_host/image_transport_factory.cc
@@ -61,12 +61,14 @@ class DefaultTransportFactory
virtual scoped_refptr<ui::Texture> CreateTransportClient(
const gfx::Size& size,
+ float device_scale_factor,
uint64 transport_handle) OVERRIDE {
return NULL;
}
virtual scoped_refptr<ui::Texture> CreateOwnedTexture(
const gfx::Size& size,
+ float device_scale_factor,
unsigned int texture_id) OVERRIDE {
return NULL;
}
@@ -97,8 +99,9 @@ class ImageTransportClientTexture : public ui::Texture {
ImageTransportClientTexture(
WebKit::WebGraphicsContext3D* host_context,
const gfx::Size& size,
+ float device_scale_factor,
uint64 surface_id)
- : ui::Texture(true, size),
+ : ui::Texture(true, size, device_scale_factor),
host_context_(host_context) {
set_texture_id(surface_id);
}
@@ -123,8 +126,9 @@ class OwnedTexture : public ui::Texture, ImageTransportFactoryObserver {
public:
OwnedTexture(WebKit::WebGraphicsContext3D* host_context,
const gfx::Size& size,
+ float device_scale_factor,
unsigned int texture_id)
- : ui::Texture(true, size),
+ : ui::Texture(true, size, device_scale_factor),
host_context_(host_context) {
ImageTransportFactory::GetInstance()->AddObserver(this);
set_texture_id(texture_id);
@@ -281,22 +285,26 @@ class GpuProcessTransportFactory :
virtual scoped_refptr<ui::Texture> CreateTransportClient(
const gfx::Size& size,
+ float device_scale_factor,
uint64 transport_handle) {
if (!shared_context_.get())
return NULL;
scoped_refptr<ImageTransportClientTexture> image(
new ImageTransportClientTexture(shared_context_.get(),
- size, transport_handle));
+ size, device_scale_factor,
+ transport_handle));
return image;
}
virtual scoped_refptr<ui::Texture> CreateOwnedTexture(
const gfx::Size& size,
+ float device_scale_factor,
unsigned int texture_id) OVERRIDE {
if (!shared_context_.get())
return NULL;
scoped_refptr<OwnedTexture> image(
- new OwnedTexture(shared_context_.get(), size, texture_id));
+ new OwnedTexture(shared_context_.get(), size, device_scale_factor,
+ texture_id));
return image;
}
« no previous file with comments | « content/browser/renderer_host/image_transport_factory.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698