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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 15685003: Part 2/3 (GL) of adding with device scale factor to transport surfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-resolve against head Created 7 years, 7 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 | « gpu/command_buffer/service/gles2_cmd_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index cdc83c8f83fa5b8429c3606d598d2820a1bef1b6..2fad0053b50fcf7c655d36c7efde44a5f0034b62 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -561,7 +561,7 @@ class GLES2DecoderImpl : public GLES2Decoder {
virtual void PerformIdleWork() OVERRIDE;
virtual void SetResizeCallback(
- const base::Callback<void(gfx::Size)>& callback) OVERRIDE;
+ const base::Callback<void(gfx::Size, float)>& callback) OVERRIDE;
virtual Logger* GetLogger() OVERRIDE;
virtual ErrorState* GetErrorState() OVERRIDE;
@@ -1626,7 +1626,7 @@ class GLES2DecoderImpl : public GLES2Decoder {
scoped_ptr<VertexArrayManager> vertex_array_manager_;
- base::Callback<void(gfx::Size)> resize_callback_;
+ base::Callback<void(gfx::Size, float)> resize_callback_;
WaitSyncPointCallback wait_sync_point_callback_;
@@ -3025,7 +3025,7 @@ void GLES2DecoderImpl::UpdateParentTextureInfo() {
}
void GLES2DecoderImpl::SetResizeCallback(
- const base::Callback<void(gfx::Size)>& callback) {
+ const base::Callback<void(gfx::Size, float)>& callback) {
resize_callback_ = callback;
}
@@ -3430,6 +3430,7 @@ error::Error GLES2DecoderImpl::HandleResizeCHROMIUM(
GLuint width = static_cast<GLuint>(c.width);
GLuint height = static_cast<GLuint>(c.height);
+ GLfloat scale_factor = c.scale_factor;
TRACE_EVENT2("gpu", "glResizeChromium", "width", width, "height", height);
width = std::max(1U, width);
@@ -3450,7 +3451,7 @@ error::Error GLES2DecoderImpl::HandleResizeCHROMIUM(
}
if (!resize_callback_.is_null()) {
- resize_callback_.Run(gfx::Size(width, height));
+ resize_callback_.Run(gfx::Size(width, height), scale_factor);
DCHECK(context_->IsCurrent(surface_.get()));
if (!context_->IsCurrent(surface_.get())) {
LOG(ERROR) << "GLES2DecoderImpl: Context lost because context no longer "
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698